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

Derivation scheme used for registration #984

Open
HCastano opened this issue Aug 6, 2024 · 1 comment
Open

Derivation scheme used for registration #984

HCastano opened this issue Aug 6, 2024 · 1 comment

Comments

@HCastano
Copy link
Collaborator

HCastano commented Aug 6, 2024

In #955 we introduced a new registration flow which uses BIP-32 account derivation to
create newly registered Entropy accounts.

Simply, it works by deriving new accounts using the following path:
m/0/{registration_count}.

While this is a nice and simple solution, it comes with some problems:

  1. The counter used is not guaranteed to be monotonic
  2. The derivation path is predictable and has no additional entropy

(1) is addressed in a bit of a roundabout way, in that the CountedStorageMap we use is
only appended to, and entries are never removed. However, we have no way to enforce this,
and future developers might break this.

(2) can be addressed by making the derivation path use something like the registering
user's AccountId as a form of additional entropy.

My first instinct here is to use something like path = hash(account_id) ++ counter, but
we may want to think about this more to see what other options we come up with.

@ameba23
Copy link
Contributor

ameba23 commented Aug 8, 2024

path = hash(account_id) ++ counter sounds good to me.

@HCastano HCastano moved this from 📋 Backlog to 🌝 Soon in Entropy Core Aug 21, 2024
@HCastano HCastano self-assigned this Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🌝 Soon
Development

No branches or pull requests

2 participants