-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added BIP39 Passphrase mismatch detection. When passphrase is enabled if
a different passphrase is entered later on, eg. `passphrase_cache` timeout, that doesn't match what's originally used to load the current wallet session KKClient will display `Conflicting BIP39 Passphrase` message. This is done by generating and saving a session 'fingerprint' from the passphrase. When a later passphrase is entered its 'fingerprint' is computed and compared to the original. The 'fingerprint' is derived using `pbkdf2(rounds = 100000, output_length = 16 bytes, digest = sha512)`. 16 random bytes from `crypto.getRandomValues` is used as the salt. Note `BlockcypherApiToken` isn't used for this purpose since it necessitates a `GetPublicKey` call to KeepKey which could trigger `PinMatrixRequest`.
- Loading branch information
Showing
2 changed files
with
100 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters