From 73c6ca27a4f9feb817cdb91f4f52eac54afb325e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 2 Aug 2025 00:52:19 -0700 Subject: [PATCH] Fix incorrect BIP-39 passphrase. --- src/lib/bip39-mnemonic.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/bip39-mnemonic.ts b/src/lib/bip39-mnemonic.ts index ea9ffff..7265c02 100644 --- a/src/lib/bip39-mnemonic.ts +++ b/src/lib/bip39-mnemonic.ts @@ -189,11 +189,10 @@ export class Bip39Mnemonic { length: 512 } - passphrase = `mnemonic${salt.normalize('NFKD')}` const algorithm: Pbkdf2Params = { name: 'PBKDF2', hash: 'SHA-512', - salt: utf8.toBytes(salt), + salt: utf8.toBytes(`mnemonic${salt.normalize('NFKD')}`), iterations: BIP39_ITERATIONS } const seedKey = await crypto.subtle.deriveKey(algorithm, phraseKey, derivedKeyType, true, ['sign']) -- 2.47.3