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

derive Nano HD seeds with bip39MnemonicToSeed (#3778)

Public commit record

What the developer wrote

Authored by malik1004x

96/100 · Strong
derive Nano HD seeds with bip39MnemonicToSeed (#3778)

Nano HD wallets derived the BIP39 seed through nanoutil's hdMnemonicListToSeed: PointyCastle PBKDF2-SHA512 in a freshly spawned isolate, on every open as well as create/restore. On a low-end phone that was ~2.8 s per create and ~3.4 s per open. Use cw_core's bip39MnemonicToSeed instead (same PBKDF2-HMAC-SHA512, 2048 rounds, salt "mnemonic", 64 bytes, hex-encoded). Mnemonics with non-ASCII characters keep the old path, since nanoutil UTF-8 encodes while bip39MnemonicToSeed uses code units. A test checks both give the same seed for random 12 and 24 word mnemonics.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit swaps the way Nano HD wallets turn a recovery phrase into a cryptographic seed. It replaces a slow, per-operation computation done in a separate isolate with a shared, faster utility that produces the same bytes for normal ASCII phrases. For phrases containing non-ASCII characters, it keeps the old, slower method because the two implementations disagree on how to encode those characters. A test verifies the outputs match for random 12- and 24-word phrases. The change is framed as a performance improvement, not a security fix.

Recommended action

Treat as a routine performance refactor. Reviewers should confirm that cw_core's bip39MnemonicToSeed is byte-for-byte equivalent to nanoutil's hdMnemonicListToSeed for the full ASCII input space and that the non-ASCII fallback is correctly triggered and preserves existing wallets. No immediate security response is indicated by the supplied materials.

Security signals we found

01

Cryptographic key derivation changed from one implementation to another in wallet open/create/restore paths

02

Fallback to legacy path for non-ASCII mnemonics due to UTF-8 vs code-unit encoding mismatch

03

No explicit security rationale or advisory in commit message or diff

04

Equivalence test added, but only covers random ASCII BIP39 mnemonics

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 8/10
Evidence quality 4/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.