Bug: getLongTermPrivateKey hardcodes derivation index 0 for mnemonic path #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In
internal/secret/keychainunlocker.go, thegetLongTermPrivateKey()function hardcodes derivation index0when deriving the long-term key from a mnemonic:This ignores the vault's actual
DerivationIndexstored invault-metadata.json. For any vault with a derivation index other than 0 (i.e., the second or subsequent vault created from the same mnemonic), this will derive the wrong long-term key, causing:Expected Behavior
The function should read the vault's metadata to get the correct
DerivationIndexand use it for key derivation.Affected Code
internal/secret/keychainunlocker.goline ~330 ingetLongTermPrivateKey()