-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: implement new CipherSeed and upgrade encryption KDF #3505
Merged
aviator-app
merged 5 commits into
tari-project:development
from
philipr-za:philip-encryption-seeds
Nov 4, 2021
Merged
feat!: implement new CipherSeed and upgrade encryption KDF #3505
aviator-app
merged 5 commits into
tari-project:development
from
philipr-za:philip-encryption-seeds
Nov 4, 2021
Conversation
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 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 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.
philipr-za
force-pushed
the
philip-encryption-seeds
branch
from
October 28, 2021 07:12
76a16e6
to
7b866dd
Compare
SWvheerden
previously approved these changes
Oct 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just a note, I manually tested this by creating a wallet, transacting and recovering using seed words with the new CipherSeed implementation and all good. |
stringhandler
approved these changes
Nov 4, 2021
stringhandler
added a commit
that referenced
this pull request
Nov 4, 2021
BREAKING CHANGES * implement new CipherSeed and upgrade encryption KDF (#3505) Features * add a Rejected status to TransactionStatus ([#3512](#3512)) ([c65a01c](c65a01c)) * add caching and clippy annotations to CI ([#3518](#3518)) ([beacb9e](beacb9e)) * implement new CipherSeed and upgrade encryption KDF ([#3505](#3505)) ([ef4f84f](ef4f84f)) Bug Fixes * edge case fix for integer pair iter ([#3508](#3508)) ([097e3e2](097e3e2)) * header sync must allow transition to archival/pruned if tip is behind ([#3520](#3520)) ([e028386](e028386))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Motivation and Context
The CipherSeed scheme has three main benefits
How Has This Been Tested?
Test have been updated