Skip to content
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

Don't rely on the master key when generating accounts under the bip 0044 path m/44'/60'/0'/0/0 #20048

Open
cammellos opened this issue May 15, 2024 · 0 comments

Comments

@cammellos
Copy link
Member

cammellos commented May 15, 2024

Currently we use the master key to derive addresses under the bip 0044 path.

This key is not stored in v1 accounts, so the wallet root key m/44'/60'/0'/0/0 should be used instead and relative path should be derived.

V1

https://specs.status.im/spec/2 this is how the old account worked.

On creation we would store 4 keys in the keystore file directory:

  1. Root chat key
  2. Root wallet key
  3. Generated chat key
  4. Generated wallet key

When deriving a new wallet account, we would derive from 2).

V2

On creation v2 stores 5 keys in the keystore file directory:

  1. Master key
  2. Root chat key
  3. Root wallet key
  4. Generated chat key
  5. Generated wallet key

When generating a new account, it will derive from 1). This will not be possible for user upgrading the app, as 1) is not stored.

We should instead change the code to generate from 3) (same as v1) if the path is non-custom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants