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 queue329AI analyses
25commits · 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 Bencun390117194258
benma's agent892848162
Niklas Dusenlund1112955059
cedwies1257063
Tomas Vrba947074
Cedric Wiese1239049
Jad812062
thisconnect211072
benma211074
Niklas111035
Yasser Aziza111070
Patrick Steiger111045
Analysis record

Published AI watches

Last scanned 35 minutes ago

Moderate 59 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/validate-backup-seed-length'

This commit adds a safety check to the BitBox02 hardware wallet's backup loading code. It now rejects backup files that claim to contain a 'seed' longer than 32 bytes. Without this check, a tampered or malformed backup could potentially ca…

Added input validation on deserialized seed_length fieldBounds check prevents oversized seed length (>32 bytes) from being acceptedNew unit test covers malformed backup with seed_length mismatch
f6d2942cby Marko Bencun+34−01 file
No security note in commit
Low 44 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/reject-oversized-policy-keys'

This commit adds a length check before showing a Bitcoin policy key on the BitBox02 device screen. Previously, an extremely long key string could be displayed or processed without a size limit. The fix rejects keys whose on-screen text exc…

Input size limit added before UI confirmationNew unit test for boundary condition (MAX_CONFIRM_BODY_SIZE and MAX_CONFIRM_BODY_SIZE + 1)Potential UI truncation or buffer issue mitigated for policy key display
1e674dfcby Marko Bencun+43−01 file
No security note in commit
Moderate 60 AI analysisMessage 90 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

backup: validate decoded seed length

This update fixes a bug in how the BitBox02 hardware wallet reads backup files from an SD card. A tampered backup file could claim to contain a seed longer than the 32-byte limit, which previously caused the device to panic (crash) when li…

Out-of-bounds/panic condition in backup parsingMissing input validation on decoded protobuf fieldSD-card backup file could be attacker-controlled
80baf1eeby benma's agent+34−01 file
Vendor flagged security relevance
Informational 11 AI analysisMessage 28 · Opaque
BB BitBoxBitBox02 firmware BitcoinHardware wallets

u2f: fix refresh screen

This commit fixes a UI cleanup bug in the BitBox02 hardware wallet's U2F (Universal 2nd Factor) feature. Previously, a 'Refresh webpage' screen could be destroyed without clearing the pointer that tracked it, potentially leaving a dangling…

dangling-pointer mitigationuse-after-free preventionfirmware UI state cleanup
890f4ce3by benma's agent+17−11 file
No security note in commit
Low 27 AI analysisMessage 28 · Opaque
BB BitBoxBitBox02 firmware BitcoinHardware wallets

u2f: fix nudge screen

This commit fixes how a small on-screen reminder (the 'nudge screen') for U2F is created, tracked, and cleaned up. Before the fix, the code could lose track of the reminder screen or mishandle its removal, which might cause display glitche…

Use-after-free / dangling-pointer risk: global _nudge_label pointer could outlive the component it referencesUI state inconsistency: previous callback set _nudge_label = NULL on screen pop, but component cleanup may occur later or not at allMemory management fix: custom cleanup wrapper now synchronizes global pointer with component lifetime
931e75d6by benma's agent+22−71 file
No security note in commit
Low 42 AI analysisMessage 58 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Fix GroundedCell result lifetime

This commit fixes a bug in the U2F confirmation workflow where the firmware could read a result from memory that had already been cleared, potentially giving an incorrect success/failure answer. The fix simply reads the result before wipin…

use-after-clear / stale reference in task stateincorrect result lifetime orderingU2F confirmation workflow
dcd408f9by benma's agent+1−11 file
No security note in commit
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
Moderate 60 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

factorysetup: validate RTT message length

This commit fixes a bug in the BitBox02 factory setup tool that receives debug messages over SEGGER RTT. Previously, if a message said it contained more bytes than were actually received, the code would copy whatever leftover data happened…

Copy of uninitialized stack data into command buffer (information disclosure / undefined behavior)Missing length validation against actual bytes receivedFactory-only code path (factorysetup), not normal user firmware operation
bb882fc0by benma's agent+5−01 file
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

eth: limit EIP-712 recursion depth

This commit adds a hard limit on how deeply nested Ethereum typed-message (EIP-712) structures can be when the BitBox02 hardware wallet signs them. Without the limit, an attacker could craft a message type that refers to itself over and ov…

Adds explicit recursion-depth cap to attacker-controlled input parsingPre-validates schema roots before host callbacks or user confirmationProtects against stack exhaustion / denial-of-service from deeply nested EIP-712 types
4ccadcc0by benma's agent+196−451 file
No security note in commit
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
Low 42 AI analysisMessage 70 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

rust: bound executor queue

This commit replaces an unbounded task queue inside the BitBox02 firmware's Rust executor with a fixed 16-slot ring buffer. It also adds a hard limit of 16 active tasks and protects queue access with critical sections so interrupt-driven c…

Replaced unbounded queue with fixed-capacity ring buffer to prevent memory exhaustionRemoved allocation from scheduling/wake path, including interrupt contextAdded critical-section synchronization between wakers and main-loop executor
b99e200aby benma's agent+186−285 files
No security note in commit
Low 42 AI analysisMessage 78 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Warn before truncated value displays

This commit adds a warning screen to the BitBox02 hardware wallet whenever a long message or value is about to be shown in a truncated form. Previously, the device could silently cut off the end of very long transaction details, message da…

UI truncation warning added before oversized confirmation bodiesCentralized body-size limit to keep Rust and C UI limits in syncReplaced duplicated warning logic with shared confirm_value helper
5b3aee6fby benma's agent+266−4710 files
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
Informational 21 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

eth: loosen EIP-712 identifier validation

This firmware update relaxes the rules for valid Ethereum typed-data (EIP-712) names so they can contain a colon (:), which some decentralized apps use as a namespace separator. Member names still cannot contain colons. The change is prese…

Input validation relaxation for externally supplied EIP-712 type namesExplicit claim that ':' cannot forge encodeType boundariesMember-name validation remains strict
9703d8d9by Marko Bencun+50−43 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
Informational 15 AI analysisMessage 28 · Opaque
BB BitBoxBitBox02 firmware BitcoinHardware wallets

py: add BitBoxSync

This commit adds a new Python client feature called BitBoxSync to the BitBox02 Python library. It introduces generated protobuf code, new API methods to request identity keys, sign various sync-related intents, and unwrap an encrypted name…

851ed04bby Marko Bencun+574−1812 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
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 queuedda14531: add unit tests for da14531_protocol_formatby benma's agent · ad4102d7 · Jan 26, 2026 · 3 filesMessage 75 · AdequateInformational 18Details
Commit message · benma's agent

da14531: add unit tests for da14531_protocol_format

The asserts are changed as they were off by one (in the safe
conversative direction).

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
parser or protocol pathsecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit adds unit tests for a Bluetooth/serial framing function and slightly relaxes four buffer-size checks from '<' to '<='. The change is described as 'off by one in the safe conservative direction', meaning the old checks rejected a perfectly-sized buffer as too small. The patch does not fix a memory corruption bug; it removes a false-positive assertion that could have caused a harmless device reset when a caller supplied an exactly-sized buffer. No security vulnerability is disclosed or demonstrated.

AI review queuedRefactor multisig_get/set_by_hash into HALby cedwies · 508cf98f · Jan 19, 2026 · 6 filesMessage 70 · AdequateInformational 18Details
Commit message · cedwies

Refactor multisig_get/set_by_hash into HAL

Also adds logic to TestingHal to make
bitbox02-rust tests use TestingHal instead of
mock_memory.

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

This commit is a code cleanup that moves multisig account storage operations behind a hardware-abstraction layer so tests can use a fake memory instead of real device memory. It does not appear to fix or introduce a security vulnerability. A few test files were updated to use the new fake memory, and one small bug was fixed where a test created a fresh fake device after registering an account, which would have made the test fail to find the registered account.

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.

Lower-prioritybitcoin/policies: fix unit testby Marko Bencun · d6bd7fab · Jan 14, 2026 · 1 fileMessage 90 · StrongTriage 0Details
Commit message · Marko Bencun

bitcoin/policies: fix unit test

The test failed not because of change/receive element mismatch, but
because the keypath pointed to a key that is not ours. That test is
already covered below (last test in function). Fixing the test means
using a keypath that does not match any key.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
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.

Lower-prioritybitcoin/policies: add unit tests for get_leaf_hash_by_pubkey and taproot_spend_infoby benma's agent · 228d3c76 · Jan 14, 2026 · 1 fileMessage 95 · StrongTriage 0Details
Commit message · benma's agent

bitcoin/policies: add unit tests for get_leaf_hash_by_pubkey and taproot_spend_info

When updating rust-miniscript to v13.0.0, these two funcs need to be
changed due to breaking changes in rust-miniscript's API. These tests
are using fixtures to make sure the upgrade does not break anything.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
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.

AI review queuedCHANGELOG: mark v9.25.0by Marko Bencun · 58997be1 · Jan 12, 2026 · 1 fileMessage 38 · OpaqueInformational 15Details
Commit message · Marko Bencun

CHANGELOG: mark v9.25.0

38/100 · OpaqueMessage clarity
✓ Subject identifies a change✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit only updates the CHANGELOG.md file to mark the release of firmware version 9.25.0. It does not change any source code, cryptographic routines, Bluetooth behavior, or password handling. The changelog mentions a password-stretching improvement and a Bluetooth bug fix, but those changes were made in earlier commits; this commit merely documents them.

AI review queuedbuild(deps): bump lru from 0.16.1 to 0.16.3 in /test/simulator-graphical (#1741)by dependabot[bot] · fa6b383a · Jan 8, 2026 · 1 fileMessage 100 · StrongInformational 10Details
Commit message · dependabot[bot]

build(deps): bump lru from 0.16.1 to 0.16.3 in /test/simulator-graphical (#1741)

Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.16.1 to 0.16.3.
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.16.1...0.16.3)

---
updated-dependencies:
- dependency-name: lru
dependency-version: 0.16.3
dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
automated dependency-update discountsecond-pass: broader security terminology
AI analysis · Informational 10/100

This is an automated dependency update by Dependabot that bumps the Rust 'lru' crate from version 0.16.1 to 0.16.3 inside a graphical simulator test component. The change only modifies a test-only lockfile and does not touch the actual BitBox02 firmware code. There is no indication in the commit that this fixes a security issue, and the supplied references do not mention any security relevance.

Lower-prioritydevice-info: change pw stretching algo stringsby Marko Bencun · 262917c5 · Jan 7, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Marko Bencun

device-info: change pw stretching algo strings

One-indexed is better than zero-indexed, as these strings are user visible.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritydelay: do not delay in simulatorby Marko Bencun · 8bdcd5f5 · Jan 7, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Marko Bencun

delay: do not delay in simulator

3f0a5df626a1c1104080d36f42079e7e2a898511 made the simulator slow by
actually waiting for 2s on each status, while before it was screen
counter based and hence instant in the simulator. This removes the
delay so the simulator is fast again.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritysimulator-graphical: update Cargo.lockby Marko Bencun · 8625ee15 · Jan 7, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Marko Bencun

simulator-graphical: update Cargo.lock

Building the simulator updates the lock file.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritysimulator-graphical: simulate Nova, same as the old simulatorby Marko Bencun · e68b36c0 · Jan 7, 2026 · 4 filesMessage 65 · AdequateTriage 0Details
Commit message · Marko Bencun

simulator-graphical: simulate Nova, same as the old simulator

It also fixes wallet creation, same issue as 5a6fea4d053ff7150e8423bbcbd4a826f80b868f.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
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.

Lower-prioritysimulator: fix simulator by fixing Nova memory fakeby Marko Bencun · 5a6fea4d · Jan 7, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Marko Bencun

simulator: fix simulator by fixing Nova memory fake

Simulator's memory made the simulator think it used ATECC, but the
fake securechip impl assumes Optiga, so the stretching algo vor
ATECC (V0) was passed to the fake securechip, which expects the V1 algo.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityoptiga: also include config update in unit testsby Marko Bencun · d3ecfb31 · Jan 6, 2026 · 3 filesMessage 78 · AdequateTriage 0Details
Commit message · Marko Bencun

optiga: also include config update in unit tests

Some more defs are moved from optiga.c to optiga.h to make them
available to the tests.

By faking the metadata reading/writing of the two new slots, we can
exercise the code that updates and checks the config.

_reset_fakes is renamed to _setup_test and now includes
optiga_setup(), so we can check the config was updated.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI review queuedoptiga: add cleanupsby Marko Bencun · f1e90dde · Jan 6, 2026 · 1 fileMessage 28 · OpaqueLow 32Details
Commit message · Marko Bencun

optiga: add cleanups

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

This commit adds automatic cleanup calls for several 32-byte temporary buffers that hold sensitive values like password hashes, HMAC keys, and password secrets in the Optiga secure-element integration code. Previously these buffers were zero-initialized at declaration but not always explicitly erased before the function returned or after an early error path. The change reduces the chance that leftover cryptographic material remains in stack memory, which could lower the risk of information leakage if an attacker later reads process memory or a core dump. It is a defensive hardening patch rather than a fix for an actively exploitable bug.

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.

AI review queuedkeystore: upgrade password algo upon unlockby Marko Bencun · 17c454de · Jan 6, 2026 · 2 filesMessage 60 · AdequateLow 28Details
Commit message · Marko Bencun

keystore: upgrade password algo upon unlock

In this moment we have all info needed at hand to upgrade the
encryption method.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
second-pass: broader security terminology
AI analysis · Low 28/100

This commit changes how the BitBox02 hardware wallet handles the password-stretching algorithm used to protect the wallet seed. When a user unlocks the device, if the seed was encrypted with an older, weaker stretching method, it is now automatically re-encrypted with the newer, stronger method. The change is a defensive upgrade, not a fix for an active attack, and it only affects the unlock flow after the correct password is entered.

Lower-priorityoptiga: add v1 unit testsby Marko Bencun · df27bbd0 · Jan 6, 2026 · 1 fileMessage 55 · ThinTriage 0Details
Commit message · Marko Bencun

optiga: add v1 unit tests

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI review queuedoptiga: reduce number of events on initby Marko Bencun · 0e1673d4 · Jan 6, 2026 · 13 filesMessage 73 · AdequateInformational 18Details
Commit message · Marko Bencun

optiga: reduce number of events on init

keystore.rs inits a new password and stretches using the new password
right after, needlessly increasing the number of Optiga security
events. Since initializing a new password already involves stretching
it, we can reuse that.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 18/100

This commit is a small internal optimization in the BitBox02 hardware wallet firmware. When a user creates or restores a password, the device previously performed two separate operations on the secure chip (Optiga/ATECC): one to initialize the new password and another to stretch it. The commit combines these into a single step, reducing the number of secure chip 'events' (internal counter operations). There is no direct security vulnerability being fixed; it is a performance and resource-usage improvement.

AI review queuedoptiga: add v1 algoby Marko Bencun · 05a813bb · Jan 6, 2026 · 11 filesMessage 73 · AdequateLow 26Details
Commit message · Marko Bencun

optiga: add v1 algo

- TestingHal defaults to Optiga, so the password algo defaults to
V1 (for ATECC it is V0). We do this because many tests check the
events counter, which only makes sense for Optiga.
- We won't adapt all tests to count the events for both V0 and V1,
that is overkill. We only count them for V1. Maybe we will add some select tests to count V0
events in the keystore only.
- init_new_password() only supports V1. V0 is only supported in
stretch_password() to allow unlocking seeds encrypted using V0.

73/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Low 26/100

This commit adds a new password-stretching algorithm (V1) for BitBox02 devices that use the Optiga secure chip. It changes how the device turns a user's password into an encryption key, adding extra secure-chip-backed hashing steps and enforcing that newly created passwords use the new algorithm. Old V0 passwords can still be unlocked for backward compatibility. There is no direct evidence in the commit of a security vulnerability being fixed; it reads as a planned feature/upgrade.

AI review queuedoptiga: rename KDF_NUM_ITERATIONSby Marko Bencun · be26b5ae · Jan 6, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Marko Bencun

optiga: rename KDF_NUM_ITERATIONS

To make it clear it's only used in V0.

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 is a simple code cleanup: it renames a constant from KDF_NUM_ITERATIONS to KDF_NUM_ITERATIONS_V0 and updates the comment to clarify that the low number of iterations (2) applies only to an older password-stretching algorithm (V0). No behavior changes, no security fix, no vulnerability patch.

Lower-priorityoptiga: split stretch_password into v0 and v1by Marko Bencun · 4d4ecd4a · Jan 6, 2026 · 2 filesMessage 45 · ThinTriage 0Details
Commit message · Marko Bencun

optiga: split stretch_password into v0 and v1

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