]> git.codecow.com Git - libnemo.git/commitdiff
Fix signing key derivation.
authorChris Duncan <chris@zoso.dev>
Sun, 23 Nov 2025 10:40:26 +0000 (02:40 -0800)
committerChris Duncan <chris@zoso.dev>
Sun, 23 Nov 2025 10:40:26 +0000 (02:40 -0800)
src/lib/vault/vault-worker.ts

index d5613a162d64444194c943b0f48b14adac423d1a..5be96d5a3342b93f32fb3edc095e1a982e4e3347 100644 (file)
@@ -253,9 +253,9 @@ export class VaultWorker {
                        if (data == null) {
                                throw new Error('Data to sign not found')
                        }
-                       const derive = this.#type === 'BIP-44'
-                               ? Bip44.ckd(this.#seed, BIP44_COIN_NANO, index)
-                               : Blake2b.ckd(this.#seed, index)
+                       const derive = this.#type === 'BLAKE2b'
+                               ? Blake2b.ckd(this.#seed, index)
+                               : Bip44.ckd(this.#type === 'Exodus' ? 'Bitcoin seed' : 'ed25519 seed', this.#seed, BIP44_COIN_NANO, index)
                        return derive.then(prv => {
                                const sig = NanoNaCl.detached(new Uint8Array(data), new Uint8Array(prv))
                                this.#timer = new VaultTimer(() => this.lock(), this.#timeout)