-
Notifications
You must be signed in to change notification settings - Fork 220
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
Wallet private key derivation is brittle #4170
Labels
A-security
Area - Security related
Comments
stringhandler
pushed a commit
that referenced
this issue
Aug 2, 2022
…n (see issue #4170) (#4316) Description --- Add domain separation for wallet key derivation for type `KeyManager`. Motivation and Context --- The current wallet key derivation uses plain concatenation of variable length inputs. This procedure is known to not be collision resistant. A better methodology, as pointed [here](#4170), is to prepend the length of each datum to it before passing it through the hash function. We attain this by using the current hashing [API](https://github.com/tari-project/tari-crypto/blob/main/src/hashing.rs), which gives a suitable interface for domain separation, (which always prepends input length). How Has This Been Tested? --- Unit tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wallet key derivation relies on concatenation of seed entropy, a variable-length branch string, and an index. These values are hashed after concatenation using SHA-256, and parsed as a private key.
This approach is brittle:
The following are recommended:
Blake2b
orBlake3
Any future hashing API should be considered when addressing this issue.
The text was updated successfully, but these errors were encountered: