AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

rust/keystore: make bip39 unlocking async

Public commit record

What the developer wrote

Authored by Marko Bencun

80/100 · Strong
rust/keystore: make bip39 unlocking async

This uses `to_seed_normalized_async(...).await` over
`to_seed_normalized(...)` in bip39 unlocking, propagating the
async/await keywords up the stack.

This commit by itself is not functional yet, as the unlock animation
is still timer-interrupt based, which leads to chaos. The next commit
converts the animation into an async task of its own, not depending on
interrupts.

The bip39 unlock loop is made to yield to the executor in each of the
2048 PBKDF2 stretch rounds. In the simulator however, we don't yield
and finish the computation in a blocking fashion like before, due to a
limitation of the simulator: it does not busy-loop the
mainloop (otherwise CPU would be at 100%), but only when there is an
incoming USB packet, so yielding in BIP39 would make unlocking in the
simulator *very* slow. Running the mainloop quicker in the simulator
does not work well: either CPU load is too high, or unlock is too slow.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit is a large internal refactoring of the BitBox02 firmware's BIP39 wallet-unlocking code. It converts the slow PBKDF2 key-stretching loop from a blocking (synchronous) operation into an asynchronous one, so the device can briefly pause each round to handle other tasks such as USB messages and screen animations. The commit also vendors the futures-core, futures-lite, and pin-project-lite Rust crates so the firmware can use async/await. The change is explicitly described by the authors as not yet fully functional on its own; a follow-up commit is needed to make the unlock animation work with the new async model. There is no direct evidence in the commit that this fixes or introduces a security vulnerability; it is primarily an architectural/performance change.

Recommended action

Treat this as a non-security-critical refactoring commit. Review the follow-up commit that completes the async animation integration to ensure the BIP39 unlock path remains timing-attack resistant and that yielding does not leak intermediate state or allow re-entrancy bugs. Audit the newly vendored futures crates for compatibility with the firmware's no_std/embedded constraints and verify their checksums match published crates.io versions.

Security signals we found

01

Large dependency addition (futures-core, futures-lite, pin-project-lite) increases firmware attack surface and supply-chain exposure.

02

Async conversion of a security-critical key-derivation path introduces new concurrency and state-machine correctness requirements.

03

Commit explicitly notes the change is not yet functional on its own, indicating potential for incomplete/partial security behavior in this snapshot.

04

No direct diff evidence of a vulnerability fix or introduction; signals are architectural rather than exploit-specific.

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 8/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.