Skip to content

Commit

Permalink
fix!: improve wallet key derivation by use of proper domain separatio…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jorgeantonio21 authored Aug 2, 2022
1 parent a2ee220 commit 7a25028
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 429 deletions.
Loading

0 comments on commit 7a25028

Please sign in to comment.