lambdaclass / lambda_ethereum_consensus

Elixir implementation of an Ethereum consensus client, which offers high reliance & fault tolerance
Apache License 2.0
94 stars 33 forks source link

Support kdf paths on Keystore #1030

Open MegaRedHand opened 4 months ago

MegaRedHand commented 4 months ago

Context: #1013

ERC-2335 keystores have a path field with a EIP-2333 path for deriving the secret. We should support non-empty values of that field.

afsanehForsat commented 4 months ago

comment

artemd24 commented 3 months ago

I'd like to tackle this!

MegaRedHand commented 3 months ago

Sure! Go ahead!

artemd24 commented 3 months ago

Hello @MegaRedHand! I have started this issue, but it's a bit unclear for me, so I have a question about implementation. Should I make password parameter in decode_str! optional and in case of nil get "secret" from decoded_json["path"] file?

MegaRedHand commented 3 months ago

No. The path attribute is for deriving the secret key. I'm not sure how it works, but once the secret is retrieved you should be able to use secret + path to derive a secret key. There is more info in the EIP linked in the issue.

Arkenan commented 2 months ago

Unassigned (more than 1 month of inactivity)