• caglararli@hotmail.com
  • 05386281520

Security Risks of Deriving Crypto Wallet Seed Phrases Using Deterministically Derived Salt

Çağlar Arlı      -    42 Views

Security Risks of Deriving Crypto Wallet Seed Phrases Using Deterministically Derived Salt

I'm working on a project where I want to generate a set of crypto wallet seed phrases from an existing seed phrase. The reason for this is so that using just the original seed phrase the wallet holder can access multiple connected accounts. My approach involves combining the original seed phrase with a deterministically derived salt. Specifically, the process is as follows:

  1. Take the original seed phrase.
  2. Generate a salt by hashing (SHA-256) the seed phrase with the first word of the seed phrase.
  3. Derive the first new seed phrase using crypto.subtle.deriveBits to get the entropy of the existing key with the generated salt, and passing it to bip39.entropyToMnemonic.
  4. Repeat the process, each time adding the next word of the original seed phrase to the hash input to create a new salt and derive a new seed phrase.

For example:

  • Hash(seed + first word) → Salt1
  • seed + Salt1 -> seed1
  • Hash(seed + first word + second word) → Salt2
  • seed + Salt2 -> seed2

While I understand that if an attacker obtains the original seed phrase, they could potentially generate all derived seed phrases if they guess the algorithm, I am concerned about other security risks associated with this approach.

Any insights or recommendations on how to address these risks and improve the security of this approach would be greatly appreciated. Thank you!