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

Versioned EIP2333 Key Generation #173

Open
Rigidity opened this issue Jul 2, 2023 · 4 comments
Open

Versioned EIP2333 Key Generation #173

Rigidity opened this issue Jul 2, 2023 · 4 comments

Comments

@Rigidity
Copy link

Rigidity commented Jul 2, 2023

The blst_derive_child_eip2333 function uses a fixed version of keygen. If you need the ability to derive child keys using blst_keygen_v3 for example, you have to manually invoke the parent_SK_to_lamport_PK function.

The issue is that bindings to parent_SK_to_lamport_PK are not present, so doing this from Rust is impossible without reimplementing the code (which would not be performant). This could be fixed by either exporting bindings for parent_SK_to_lamport_PK (simpler) and/or by making a blst_derive_child_eip2333 function for each version, similar to blst_keygen.

@dot-asm
Copy link
Collaborator

dot-asm commented Jul 4, 2023

The blst_derive_child_eip2333 function uses a fixed version of keygen.

And that's how EIP-2333 defines it. I mean if it didn't use the specific version, then it couldn't be called derive_child_eip2333. And there are no versions in the spec. So why the question? I mean the goal of the project is not exactly to meet random requests, there should be justification...

@Rigidity
Copy link
Author

Rigidity commented Jul 5, 2023

Not everyone is using the most up to date version of the standard. Chia for example, uses v3 keygen, and deriving compatible hardened keys is impossible with v5. blst_derive_child_eip2333 is only a two line function, so it seems rather simple to just export parent_SK_to_lamport_PK so it can be implemented manually in Rust using the desired version.

@mratsim
Copy link
Contributor

mratsim commented Jul 5, 2023

Not everyone is using the most up to date version of the standard. Chia for example, uses v3 keygen, and deriving compatible hardened keys is impossible with v5. blst_derive_child_eip2333 is only a two line function, so it seems rather simple to just export parent_SK_to_lamport_PK so it can be implemented manually in Rust using the desired version.

The issue is not being simple to add, it's about support and maintenance for the years to come and also documentation to explain the differences and if changes or deprecation is needed, making sure that stakeholders are informed.

Does Chia have a spec? It would, let's say it's called CIP (Chia Improvement proposal), the resulting proc can be called blst_derive_child_cip1234 leaving no doubt to who it is for.

@dot-asm
Copy link
Collaborator

dot-asm commented Jul 5, 2023

As @mratsim implied, a reference to a spec is the best way to go about.

As for exposing parent_SK_to_lamport_PK. Formally speaking it's not necessarily off the table, but there should be an indication that it's a sensible thing to do. For example availability of multiple conflicting specs/drafts and versions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants