BB
← All projectsBitBox

BitBox02 firmware

Firmware and bootloader for BitBox02 signing devices.

BitcoinHardware walletsNormal
Repository coverage

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

193security candidates127second-pass queue190AI analyses
28commits · 30 days
47commits · 60 days
312commits · 180 days
647commits · 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
65Strong · 80–100
281Adequate · 60–79
230Thin · 40–59
71Opaque · 0–39
23security 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 Bencun390117117258
Niklas Dusenlund1112927059
benma's agent892827062
cedwies1255063
Tomas Vrba944074
Cedric Wiese1233049
Jad811062
thisconnect211072
benma211074
Niklas111035
Yasser Aziza111070
Patrick Steiger111045
Analysis record

Published AI watches

Last scanned 14 minutes ago

Low 39 AI analysisMessage 73 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

rust: initialize C output buffers

This commit fixes a class of low-level memory-safety bugs where Rust code was given buffers containing uninitialized bytes. Rust's rules require every byte of a slice to be initialized, even if the function will overwrite them. Passing uni…

Undefined behavior at C/Rust FFI due to uninitialized buffers being treated as Rust slicesPotential optimizer-dependent behavior from violating Rust slice initialization rulesHardening of cryptographic output paths (SHA-256, HMAC-SHA256, HMAC-SHA512)
511018eaby benma's agent+52−2713 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

py: extract bootloader connection

This commit is a minor code cleanup in a Python helper script. It moves existing bootloader connection logic into a small nested helper function to satisfy a style checker (pylint's limit on the number of return statements). No behavior ch…

886113d0by benma's agent+10−61 file
No security note in commit
Informational 12 AI analysisMessage 45 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

releases: add v9.26.2, v9.26.3 and v9.26.4

This commit is a routine release-management update. It adds signed build assertions for three new BitBox02 firmware versions (9.26.2, 9.26.3, 9.26.4) and updates the release documentation and build helper script. The build script now delet…

No firmware source code is modifiedNo cryptographic primitives or protocols are changedNo bug fixes or vulnerability mitigations are present in the diff
eed2e68eby Marko Bencun+79−116 files
No security note in commit
Moderate 59 AI analysisMessage 69 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Limit SD erase file size

This commit fixes a bug in how the BitBox02 hardware wallet wipes files from its SD card. Before erasing a file, the device now checks the file's reported size against a safe maximum. Without this check, a tampered SD card could claim a fi…

CVE-2026-6682 referenced in commit messageMalformed FAT directory entry could cause excessive overwrite loopDenial-of-service via SD card tampering
2453f528by Marko Bencun+4−01 file
Vendor flagged security relevance
High 70 AI analysisMessage 66 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Validate mounted FAT geometry

This update adds a safety check when the BitBox02 hardware wallet mounts a microSD card. A malicious or deliberately malformed FAT filesystem could trick the device's file-system library into placing user data inside attacker-controlled bo…

Fixes integer-wrap / geometry confusion in FAT mount logicAdds explicit post-mount validation of filesystem metadataPrevents data area from landing inside attacker-controlled FAT sectors
01c017d6by Marko Bencun+21−01 file
Vendor flagged security relevance
Low 27 AI analysisMessage 69 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Update FatFs to R0.16

This commit updates the third-party FatFs file-system library inside the BitBox02 firmware from version R0.14b to R0.16 plus an upstream patch. The change is a routine dependency refresh: it replaces the vendored source files with the newe…

Third-party dependency update (FatFs R0.14b -> R0.16+p1)No explicit security claim in commit messageNo CVE or advisory referenced in commit or supplied references
9f2b493dby Marko Bencun+3842−256979 files
No security note in commit
Low 34 AI analysisMessage 59 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

api: add BitBoxSync

This commit adds a brand-new firmware feature called BitBoxSync, which lets the BitBox02 hardware wallet participate in a sync service by proving its identity, signing login/admin intents, and decrypting namespace encryption keys. The code…

New cryptographic API surface added to the hardware wallet (Ed25519, X25519, HKDF, AEAD)Vendored third-party crate `hkdf` introduced into the firmware supply chainNew user-confirmation flow for signing sync intents; one operation (UnwrapNamespaceDek) deliberately skips confirmation
54cdb54dby Marko Bencun+2883−2230 files
No security note in commit
Informational 0 AI analysisMessage 45 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

blupgrade: update stage1 binaries to v1.2.2

This commit simply swaps in newer pre-built bootloader stage1 binary files (version 1.2.2 replacing 1.2.1) for four BitBox02 hardware variants and updates the corresponding checksum list. The actual code inside the new binary files is not …

5940a800by Marko Bencun+8−86 files
No security note in commit
Moderate 59 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bootloader/stage1: fix erase handling for partially erased blocks

This update fixes the BitBox02 bootloader's firmware-erase routine. Previously, when erasing leftover padding after a firmware update, the bootloader started erasing at the exact page where the firmware ended. Because flash memory can only…

Bootloader firmware erase routine could erase a flash block containing both firmware and paddingFix aligns erase start to erase-block boundary and re-checks erased state before erasingChangelog describes the change as a fix for 'partially erased flash blocks'
b31206a8by Marko Bencun+23−83 files
No security note in commit
Informational 15 AI analysisMessage 45 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

blupgrade: add stage0/stage1 production binaries

This commit adds production bootloader upgrade files for the BitBox02 hardware wallet and updates build scripts to use them. It is a routine asset-management change: replacing placeholder development hashes with real signed production bina…

8db4b0dcby Marko Bencun+26−1720 files
No security note in commit
Informational 20 AI analysisMessage 83 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

blupgrade: keep dev stage1 unsigned

This commit fixes a build script used only for development/testing versions of the BitBox02 bootloader upgrade. It makes the development-stage1 bootloader images unsigned again, while keeping production images fully signature-verified. The…

Signature verification relaxed only for development buildsProduction payload validation still requires signaturesDevelopment stage0 already skipped stage1 signature verification per commit message
476b90e3by Marko Bencun+9−69 files
No security note in commit
High 76 AI analysisMessage 23 · Opaque
BB BitBoxBitBox02 firmware BitcoinHardware wallets

security improvements

This BitBox02 firmware update is a broad security patch that fixes several independent bugs: it prevents a maliciously oversized USB report from overflowing memory, stops a corrupted Bluetooth pairing database from being read or written wi…

Bounds check added to USB HID Set Report input lengthBLE bond DB length validation hardened against negative and oversized valuesBootloader firmware image size limit relaxed to intended maximum
cbb40634by Marko Bencun+1117−25021 files
Vendor flagged security relevance
Low 46 AI analysisMessage 60 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bootloader: allow full sized images

This commit fixes a bootloader bug where the device rejected firmware updates that used the maximum allowed size. The off-by-one check meant legitimate full-sized firmware images could not be installed, potentially blocking updates. The fi…

Off-by-one input validation in firmware-update pathBootloader change affecting firmware chunk count acceptanceCHANGELOG labels the change as a bugfix for full-sized firmware upgrades
f60b93ccby Marko Bencun+5−33 files
No security note in commit
Moderate 59 AI analysisMessage 28 · Opaque
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Add bootloader update

This is a large firmware commit that adds a new two-stage bootloader update mechanism for the BitBox02 hardware wallet. It replaces the old single bootloader with a small, fixed 'stage0' plus a separately signed 'stage1', and ships a speci…

Bootloader architecture changed from monolithic to two-stage (stage0 + signed stage1).Firmware signature hash now includes a 16-bit product_id, binding firmware to product variant.Root public keys were rotated/replaced with a single set across all products.
3f1f3172by Marko Bencun+5003−52379 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 73 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Add flash data backup scripts

This commit adds two helper scripts for developers to back up and restore BitBox02 flash memory areas using a Segger J-Link debugger. The scripts require physical hardware access and a debugging probe, and they are not part of the firmware…

285fa768by Niklas Dusenlund+383−03 files
No security note in commit
Informational 15 AI analysisMessage 40 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bb03 UI: placeholder BTC signing workflows

This commit replaces unfinished placeholder code (which would crash with 'todo!()') with simple working user-interface placeholders for Bitcoin signing demonstrations. It adds basic on-screen prompts to confirm a recipient/amount and a tot…

f7b0b082by Jad+24−121 file
No security note in commit
Informational 17 AI analysisMessage 78 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Bump Rust toolchain to 1.96

This commit is a routine maintenance update for the BitBox02 hardware wallet firmware. It upgrades the pinned Rust compiler toolchain from an older version to Rust 1.96.0, updates the project's Docker build container and related developer …

Routine toolchain and dependency upgradeVendored libc updated across many platform bindingsNo first-party security-relevant code changes
55e3dd30by Niklas Dusenlund+14839−13798360 files
No security note in commit
Informational 18 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bootloader: reduce snprintf

This commit removes the use of the standard snprintf formatting function from the BitBox02 bootloader's developer menu and replaces it with a small, fixed-format helper. The main goal is to reduce the bootloader's binary size and make the …

Removes snprintf/printf usage from bootloader code, reducing binary bloat and eliminating a complex formatting library from a privileged execution contextExtends automated CI check to detect stdio/Rust formatting symbols in regular development and production bootloader outputs, not just production buildsAdds unit test coverage for the new fixed-format helper
2fb9d57fby Marko Bencun+59−106 files
No security note in commit
Informational 12 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bootloader: hash BLE firmware in C

This commit is a code-size optimization for the BitBox02 bootloader. It switches the Bluetooth Low Energy (BLE) firmware hash verification from a Rust SHA-256 implementation to an existing C-based SHA-256 implementation already used by the…

Change is described by the vendor as a size optimization, not a security fix.No functional change to the hash verification logic: SHA-256 digest is still computed and compared against metadata.allowed_firmware_hash.CI check added to enforce use of the smaller PUKCC SHA-256 path in production bootloaders.
1d82b8a4by Marko Bencun+18−02 files
No security note in commit
Low 35 AI analysisMessage 63 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

bootloader: avoid snprintf formatting

This commit removes the use of standard string-formatting functions (like snprintf and Rust's format!) from the bootloader and related low-level code, replacing them with smaller, fixed-size string builders. The stated goal is to reduce bi…

Removal of stdio formatting (snprintf family) from bootloader codeRemoval of Rust format!/write! formatting from bootloader-linked codeAddition of CI gate rejecting stdio and Rust formatting symbols in production bootloader ELFs
33434fa9by Marko Bencun+298−6314 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 candidatesecp256k1: compile ecdsa_anti_exfil_host_commit only for testingby benma's agent · c67dae9a · Feb 3, 2026 · 1 fileMessage 60 · AdequateInformational 16Details
Commit message · benma's agent

secp256k1: compile ecdsa_anti_exfil_host_commit only for testing

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 16/100

This commit hides a special testing-only function from the normal firmware build. The function itself is not a vulnerability; it is a build-hygiene change to make sure code meant only for unit tests is not compiled into the real device firmware. That reduces the attack surface slightly, but it does not fix any known bug.

Security candidatebitbox-secp256k1: remove needless ffi def of secp256k1_ecdsa_signature_serialize_compactby benma's agent · e338d122 · Feb 3, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · benma's agent

bitbox-secp256k1: remove needless ffi def of secp256k1_ecdsa_signature_serialize_compact

It is already wrapped in the bitcoin::secp256k1 dep.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundarycryptography-sensitive path
AI analysis · Informational 15/100

This commit removes a duplicate low-level binding to a secp256k1 cryptographic function and replaces its use with an equivalent, already-vetted wrapper from the project's dependency on the bitcoin::secp256k1 Rust crate. It is a code cleanup/refactoring change with no security-relevant behavior change visible in the diff.

Security candidatebuild: consolidate secp256k1 into new crate bitbox-secp256k1by benma's agent · eabe5aa4 · Feb 3, 2026 · 27 filesMessage 85 · StrongInformational 12Details
Commit message · benma's agent

build: consolidate secp256k1 into new crate bitbox-secp256k1

- cargo-first build of the secp256k1-zkp C dep, so the crate can be
compiled without CMake and normal cargo tooling works
- Moved bitbox02::secp256k1 and bitbox02_rust::secp256k1 into it

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 12/100

This commit is a build-system refactor: it moves the secp256k1 cryptographic library dependency into a new Rust crate called bitbox-secp256k1 so it can be built with normal Cargo tooling instead of CMake. The actual cryptographic functions (signing, nonce commitments, DLEQ proofs, etc.) are copied almost unchanged from existing modules into the new crate. There is no direct evidence in the commit that this fixes a security vulnerability or introduces a new exploit.

Security candidatefactorysetup: move secp256k1 verification to Rustby benma's agent · e27a884e · Feb 3, 2026 · 4 filesMessage 78 · AdequateInformational 20Details
Commit message · benma's agent

factorysetup: move secp256k1 verification to Rust

The last remaining secp256k1 C library use. After this, we can
consolidate all sec256k1 things into a new bitbox-secp256k1 crate.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validationcryptography-sensitive path
AI analysis · Informational 20/100

This commit rewrites a small piece of the BitBox02 factory-setup code from C to Rust. The code verifies a cryptographic signature on the device during factory setup. The change itself is a routine refactoring: it removes the old C secp256k1 library call and replaces it with an equivalent Rust call. There is no indication in the commit that this fixes a known security bug, and the new Rust code includes tests for invalid inputs. On its own, this looks like a defensive hardening/cleanup change rather than a vulnerability fix.

Security candidateHAL: add reboot_to_bootloader()by cedwies · afcdcbe3 · Jan 31, 2026 · 3 filesMessage 35 · OpaqueInformational 18Details
Commit message · cedwies

HAL: add reboot_to_bootloader()

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

This commit is a straightforward internal refactoring: it moves the device-reboot-into-bootloader function behind a new 'System' hardware-abstraction trait so the rest of the Rust code calls it through a generic interface rather than directly. The actual reboot behavior, safety checks (a user confirmation screen), and underlying C function are unchanged. There is no new vulnerability here; it is normal code cleanup.

Security candidateport communication_mode to Rustby benma's agent · bc518af8 · Jan 16, 2026 · 15 filesMessage 58 · ThinInformational 17Details
Commit message · benma's agent

port communication_mode to Rust

With extern C functions to use them in the C code. The firmware main
loop will be ported to Rust, so it will not be needed there much
longer, but the bootloader also uses it.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
update trustboot or update pathparser or protocol path
AI analysis · Informational 17/100

This commit rewrites a small piece of firmware logic from C to Rust. The logic decides whether the BitBox02 Nova hardware wallet should use Bluetooth or USB for communication. There is no obvious security bug introduced by the change; it appears to be a routine language port with matching behavior and added unit tests.

Security candidaterust: update rust-miniscript to v13.0.0.by Marko Bencun · 4c1c8000 · Jan 14, 2026 · 122 filesMessage 60 · AdequateInformational 16Details
Commit message · Marko Bencun

rust: update rust-miniscript to v13.0.0.

This saves 30144 bytes in the firmware binary.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathboot or update pathparser or protocol path
AI analysis · Informational 16/100

This commit updates the BitBox02 firmware's vendored copy of the Rust 'miniscript' library to version 13.0.0, along with its dependency 'hex-conservative'. The stated reason is to reduce firmware size by about 30 KB. The change is a routine dependency refresh; the commit message and diff do not describe any security bug being fixed, and no independent security advisory is supplied.

Security candidatereleases: add v9.25.0by Marko Bencun · 63827e2f · Jan 13, 2026 · 6 filesMessage 61 · AdequateInformational 15Details
Commit message · Marko Bencun

releases: add v9.25.0

Since 011c8aa893dcf48e47268de0f52a839ee8fbc4eb we don't tag and release the
bitcoin-only variant separately anymore, so in the releases folder we
also consolidate both into one folder for consistency. This way we can
link to one folder from the release page, which now contains both variants.

61/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit is a routine release packaging update. It adds the signed build reproducibility assertions for BitBox02 firmware version 9.25.0 (both the multi-coin and Bitcoin-only variants) and updates the helper script and documentation to handle a new naming scheme where the product name is included in the assertion filename. There is no code change to the firmware itself and no security vulnerability is introduced or fixed.

Security candidateRegenerate Python protobuf stubsby cedwies · cb71f488 · Jan 12, 2026 · 11 filesMessage 58 · ThinInformational 15Details
Commit message · cedwies

Regenerate Python protobuf stubs

Auto generated protobuf files were mistakenly
edited when changing the license headers for
the entire repo. Regenerated via 'make -C py'

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit only fixes the formatting of license headers in automatically generated Python type-stub files. It moves the SPDX license notice from a standalone comment line into the generated docstring block. There is no change to program logic, no security fix, and no vulnerability.

Security candidatemove bitbox02::util to util::stringsby benma's agent · daec715d · Jan 7, 2026 · 13 filesMessage 60 · AdequateInformational 15Details
Commit message · benma's agent

move bitbox02::util to util::strings

It's not BitBox02 related, so we can move it to the util crate.

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

This commit simply moves a set of helper functions for handling strings from one Rust module to another. The actual code is copied unchanged, and all existing callers are updated to use the new location. There is no security fix or behavior change.

Security candidateapi/device_info: add password_stretching_algoby Marko Bencun · c1cb7182 · Jan 6, 2026 · 6 filesMessage 35 · OpaqueInformational 18Details
Commit message · Marko Bencun

api/device_info: add password_stretching_algo

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body! Opaque security-relevant change
Why it was queued
cryptography-sensitive path
AI analysis · Informational 18/100

This commit adds a new read-only field to the BitBox02's device information API that tells the connected app which password-stretching algorithm the device uses. It does not change how passwords are stretched or how they are verified; it only exposes existing internal information to the host. There is no indication this is a security fix or that it introduces a vulnerability.

Security candidateMove "get_attestation_*" functions to HALby cedwies · 45355e61 · Jan 3, 2026 · 2 filesMessage 55 · ThinInformational 18Details
Commit message · cedwies

Move "get_attestation_*" functions to HAL

attestation.rs was expanded with tests

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

This commit is a code cleanup and test-improvement change. It moves two device-attestation helper functions from a direct hardware call into a software 'hardware abstraction layer' (HAL) so the code can be tested without the real device. It also adds unit tests that simulate the attestation process. There is no indication this fixes a security bug or introduces a new vulnerability.

Security candidatelicense: add header to files where it was missingby benma's agent · 3483cf65 · Dec 22, 2025 · 16 filesMessage 45 · ThinInformational 15Details
Commit message · benma's agent

license: add header to files where it was missing

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

This commit only adds Apache-2.0 license header comments to 16 source files that were missing them. It makes no functional changes to the BitBox02 firmware or its Python tools. There is no security impact.

Security candidatelicense: replace Shift Apache headersby benma's agent · 52b9db70 · Dec 22, 2025 · 429 filesMessage 80 · StrongInformational 15Details
Commit message · benma's agent

license: replace Shift Apache headers

Replace the existing Shift Crypto/Shift Devices Apache-2.0 boilerplate header blocks with the standard SPDX License Identifier tag: "SPDX-License-Identifier: Apache-2.0".

This is better than the previous multi-line text header because it is machine-readable, unambiguous, and widely understood by tooling (scanners, compliance automation), while keeping files smaller and reducing header churn.

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
cryptography-sensitive pathseed or entropy pathsigning or wallet pathboot or update pathauthentication pathparser or protocol path
AI analysis · Informational 15/100

This commit is a bulk license-header cleanup. It replaces long, multi-line copyright and Apache-2.0 license notices at the top of 429 source files with a single, standardized machine-readable tag: 'SPDX-License-Identifier: Apache-2.0'. No program logic, build rules, or file contents other than the header comments were changed. It does not introduce or fix any security vulnerability.

Security candidatepy: fix fmt linterby Marko Bencun · b77c25c7 · Dec 22, 2025 · 3 filesMessage 51 · ThinInformational 15Details
Commit message · Marko Bencun

py: fix fmt linter

Before a recent black update, black would, for each file it formatted,
apply the pyproject.toml related to it, e.g. py/pyproject.toml for all
files in py/, and not for files outside of py/. Since the black
update, if formatting files both inside and outside of py/, it would
ignore pyproject.toml, as it's not in the root.

We do a workaround by supplying configuring the linter to use
py/pyproject.toml for all files. Alternative would be to apply black
file-by-file, but that is much slower. Another alternative is to make
split it into two runs, but that was too much trouble. Moving
pyproject.toml from py/ to the root seemed wrong, as the root is not a
Py project.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathboot or update path
AI analysis · Informational 15/100

This commit is a routine code-style fix. It updates the Python formatter (black) configuration so the linter uses the correct pyproject.toml file, and reformats two Python files to match the new style rules. There are no security changes to the firmware or any sensitive logic.

Security candidatesecp256k1: fix docstring typoby Marko Bencun · 36397779 · Dec 22, 2025 · 1 fileMessage 63 · AdequateInformational 15Details
Commit message · Marko Bencun

secp256k1: fix docstring typo

keystore locked error used to be the case in the past when this
function took the private key from the keystore, but that changed.

63/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
secret or key materialcryptography-sensitive path
AI analysis · Informational 15/100

This commit only fixes a typo in a code comment (docstring). It changes the description of when a function can return an error, matching the fact that the function now receives the private key directly rather than fetching it from a locked keystore. No actual code behavior is changed.

Security candidateremove use of EC_PUBLIC_KEY_LENby Marko Bencun · de9d4828 · Dec 22, 2025 · 3 filesMessage 58 · ThinInformational 15Details
Commit message · Marko Bencun

remove use of EC_PUBLIC_KEY_LEN

It was a leftover from the time we used libwally-core. The same
constant is available in bitcoin::secp256k1::constants::PUBLIC_KEY_SIZE.

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

This commit is a routine code cleanup. It removes a locally defined constant for compressed secp256k1 public key size (33 bytes) and replaces it with an equivalent constant already provided by the upstream Rust bitcoin/secp256k1 library. The numeric value and behavior remain exactly the same.

Security candidatetrinary_input_string: simply bip39 word helper functionby benma's agent · 400289a5 · Dec 22, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · benma's agent

trinary_input_string: simply bip39 word helper function

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
secret or key material
AI analysis · Informational 15/100

This is a small internal cleanup in the BitBox02 firmware's on-screen text input component. A helper function that fetches BIP39 seed words was simplified so callers no longer check its return value; the helper itself now aborts on failure. There is no security vulnerability here—just a minor code-style refactor that keeps the same failure behavior.

Security candidateremove keystore.cby benma's agent · a8d387df · Dec 22, 2025 · 5 filesMessage 43 · ThinInformational 12Details
Commit message · benma's agent

remove keystore.c

The two remaning functions are unrelated to keystore, and inlined into
the Rust C wrappers of secp256k1.

43/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 12/100

This commit removes an old C source file called keystore.c and moves two small cryptographic helper functions directly into the Rust part of the project. The functions themselves still do exactly the same secp256k1 signing and nonce-commitment work as before; they are just called from Rust instead of going through a thin C wrapper. There is no indication this fixes or introduces a security bug.

Security candidatekeystore: move keystore_get_bip39_word_stack out of keystore.cby benma's agent · 9fd859e5 · Dec 22, 2025 · 3 filesMessage 50 · ThinInformational 15Details
Commit message · benma's agent

keystore: move keystore_get_bip39_word_stack out of keystore.c

It has nothing to do with the keystore.

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
secret or key material
AI analysis · Informational 15/100

This commit simply moves a helper function that looks up a BIP39 word by its index from one source file to another. The function's behavior and the callers' logic are unchanged; it is a code cleanup with no security impact.

Security candidaterust: move secp256k1 funcs from keystore.rs to secp256k1.rsby benma's agent · d5b90e6a · Dec 22, 2025 · 9 filesMessage 65 · AdequateInformational 15Details
Commit message · benma's agent

rust: move secp256k1 funcs from keystore.rs to secp256k1.rs

They are not related to the keystore. The keystore.c functions they
use will be dealt with in the next commit.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100

This commit is a simple code reorganization: it moves functions that perform secp256k1 cryptographic signing from a file named keystore.rs into a file named secp256k1.rs. The actual behavior of the code, including how private keys are used and how signatures are produced, does not change. It is a refactoring, not a security fix or vulnerability.

Security candidatereadme: improve py/readme.md with install instructionsby thisconnect · e3ea774b · Dec 21, 2025 · 2 filesMessage 85 · StrongInformational 15Details
Commit message · thisconnect

readme: improve py/readme.md with install instructions

Added copy / pasteable instructions so that users without deeper
python knowledge can just use the python scripts.
i.e. users without knowledge about venv.

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

This commit only updates user documentation (README) and adds a binary firmware file. There is no code change that fixes or introduces a security vulnerability. It is a routine documentation improvement.

Security candidaterust: update toolchain to 1.92by Marko Bencun · a2fd5f58 · Dec 18, 2025 · 372 filesMessage 80 · StrongLow 25Details
Commit message · Marko Bencun

rust: update toolchain to 1.92

There is a breaking change about abort_immediate_panic, see
CMakeLists.txt.

Also called `cargo update --precise 0.2.177 libc` in src/rust to align
the libc we use with the one in stdlib, to avoid a duplicate dep.

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
seed or entropy pathauthentication path
AI analysis · Low 25/100

This commit updates the Rust compiler toolchain from an unspecified earlier version to Rust 1.92 for the BitBox02 hardware wallet firmware. It also refreshes many vendored third-party Rust libraries (such as libc, hashbrown, getopts) and build tools (cbindgen, bindgen). The stated reason is compatibility with the new toolchain, including a breaking change around panic handling. There is no direct evidence in the commit that this fixes a known security vulnerability, but toolchain and dependency updates can affect security-relevant behavior such as memory safety, panic handling, and type definitions used in cryptographic code.

Security candidaterust/util: add unit tests for rust_hmac_sha256/rust_hmac_sha512by benma's agent · 3e2eb99a · Dec 16, 2025 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · benma's agent

rust/util: add unit tests for rust_hmac_sha256/rust_hmac_sha512

And make sure overlaps are allowed explicitly, which we make use of
for example in atecc.c/optiga.c.

rust_sha256 code is also adjusted to be consistent in style (drop
`data` before using `out`).

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

This commit adds unit tests for two cryptographic helper functions and slightly reorders their internal steps so the output buffer is only written after the HMAC calculation is complete. The change makes it safe for the output buffer to overlap with the input or key buffers, and documents that overlap is allowed. There is no new vulnerability here; it is a defensive hardening and testing improvement.

Security candidatehal: add Memory HALby benma's agent · f174e0aa · Dec 8, 2025 · 18 filesMessage 38 · OpaqueTriage 10Details
Commit message · benma's agent

hal: add Memory HAL

With unit tests for `password::enter`

38/100 · OpaqueMessage clarity
✓ Subject identifies a change✓ Mentions testing or verification! No meaningful explanatory body! Opaque security-relevant change
Why it was queued
authentication path