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

port bip39 functionality from libwally-core to rust-bip39

Public commit record

What the developer wrote

Authored by Marko Bencun

85/100 · Strong
port bip39 functionality from libwally-core to rust-bip39

rust-bip39 is much faster than libwally, so the unlock animation is
speed up so that the last animation frame lingers for a bit, otherwise
the change felt too abrupt.
✓ Specific, 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 replaces the BIP39 (seed phrase) implementation inside the BitBox02 hardware wallet from one library (libwally-core) to another (rust-bip39). The main user-visible reason is speed: unlocking the device is now faster, so the unlock animation was shortened. The change touches how seed phrases are converted to cryptographic seeds and how individual BIP39 words are looked up. There is no direct evidence in the commit that this fixes a known security bug, but any change to cryptographic code can introduce subtle risks, so it deserves careful review.

Recommended action

Treat this as a high-priority cryptographic change. Independently verify that rust-bip39 produces byte-for-byte identical BIP39 seed output for all supported seed lengths and passphrases compared to the previous libwally implementation. Audit the unsafe FFI functions rust_derive_bip39_seed and rust_get_bip39_word for null-pointer handling, buffer length checks, and correct null termination. Confirm that all intermediate mnemonic and seed buffers are zeroized and that no copies linger in Rust or C memory. Run the existing unit tests and add edge-case tests for empty passphrase, non-ASCII passphrase handling, maximum-length passphrases, and invalid seed lengths.

Security signals we found

01

Cryptographic library migration (libwally-core BIP39 → rust-bip39)

02

New unsafe FFI boundary for passphrase pointer and output buffer

03

Use of zeroize for sensitive derived seed material

04

Removal of C-side mnemonic string cleanup block; seed now passed directly to Rust

05

Change to unlock code path that derives the BIP39 seed used for wallet operations

Risk score

Why this scored 27/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 4/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.