-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: implement new CipherSeed and upgrade encryption KDF (#3505)
Description --- This PR adds a new CipherSeed implementation for use a seed for Key Derivation. The goal of the scheme is produce a wallet seed that is versioned, contains the birthday of the wallet, starting entropy of the wallet to seed key generation, can be enciphered with a passphrase and has a checksum. During this process it was noted that we used a naive method to derive our database encryption key from the passphrase. This PR also updates that method to use Argon2 as a proper password hashing scheme that is not vulnerable to rainbow table brute forcing and timing attacks. - Update db encryption key generation to use Argon2 KDF - Persist the Argon2 salted hash in the DB to detect when encryption has been applied - Implement a CipherSeed scheme based on aezeed that can be encoded using the Mnemonic seed words - Integrate the new CipherSeed into the KeyManagers - Update Wallet backend and Clients to use the new CipherSeeds Motivation and Context --- The CipherSeed scheme has three main benefits - It contains the seed birthday which means we perform recoveries more efficiently and not scan the whole blockchain - It contains a checksum to verify the seed phrase is correct - It can be encrypted with a passphrase and decrypted and authenticated. We don’t current’y use a passphrase on the seeds. That will be future work. How Has This Been Tested? --- Test have been updated
- Loading branch information
1 parent
21b5c5f
commit ef4f84f
Showing
34 changed files
with
1,054 additions
and
898 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.