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

Implement pbkdf2 on Keystore #1029

Closed
MegaRedHand opened this issue Apr 23, 2024 · 3 comments · Fixed by #1078
Closed

Implement pbkdf2 on Keystore #1029

MegaRedHand opened this issue Apr 23, 2024 · 3 comments · Fixed by #1078
Assignees
Labels
good first issue Good for newcomers

Comments

@MegaRedHand
Copy link
Collaborator

MegaRedHand commented Apr 23, 2024

Context: #1013

Currently, we only support the Scrypt key derivation function. We want to support pbkdf2 since that one's also mentioned in ERC-2335.

@MegaRedHand MegaRedHand added the good first issue Good for newcomers label Apr 23, 2024
@okekefrancis112
Copy link

am I to write the pbkdf from scratch using "elixir" and plug the keystore into it?

@MegaRedHand
Copy link
Collaborator Author

MegaRedHand commented Apr 25, 2024

No need. We can add https://hex.pm/packages/pbkdf2_elixir as a dependency for that. Most of the work is calling that here:

defp derive_key!(%{"function" => "pbkdf2"} = drf, _password) do
%{"dklen" => _dklen, "salt" => _salt, "c" => _c, "prf" => "hmac-sha256"} = drf

@MegaRedHand
Copy link
Collaborator Author

Hey there, @okekefrancis112 ! We ended up implementing this in #1078. Sorry for the trouble!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Development

Successfully merging a pull request may close this issue.

2 participants