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

Can i got private key which derived by Nist256p1 ? #57

Open
weixuefeng opened this issue Apr 17, 2022 · 7 comments
Open

Can i got private key which derived by Nist256p1 ? #57

weixuefeng opened this issue Apr 17, 2022 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@weixuefeng
Copy link

public static DeterministicKey createMasterPrivateKeyNist(byte[] seed) throws HDDerivationException {
        return createMasterPrivateKeyWithKeys(seed, "Nist256p1 seed".getBytes());
    }
@weixuefeng
Copy link
Author

i want to create a wallet snap, but my crypto coin used Nist256p1 algorithm. can i got the private key by metamask?

@rekmarks rekmarks transferred this issue from MetaMask/metamask-docs Apr 18, 2022
@rekmarks
Copy link
Member

Hey @weixuefeng, thank you for creating this issue! Could you tell us a bit more about your use case? Specifically, why do you need to use the NIST curve? Is it because your protocol requires it?

@rekmarks rekmarks added the enhancement New feature or request label Apr 18, 2022
@weixuefeng
Copy link
Author

yes, i want to add "NEW" coin by snap, newton, NEO, ONT used NIST algorithm. could you help me @rekmarks thanks for you reply!

@rekmarks rekmarks added the help wanted Extra attention is needed label May 9, 2022
@rekmarks
Copy link
Member

rekmarks commented May 9, 2022

@weixuefeng we are currently blocked on adding this capability due to the lack of a good JavaScript implementation of this curve. We could maybe make do with WebAssembly, but we do not have the capacity to research the matter at this time.

I will keep this issue open since it is a legitimate use case that we want to support.

@rekmarks
Copy link
Member

rekmarks commented May 10, 2022

After doing some digging, the web crypto APIs (window.crypto and window.SubtleCrypto) do actually implement this curve. However, these APIs are low-level and we currently don't have any applied cryptographers available to implement what we need using them. This issue will be in limbo until we do.

Edit: But they don't provide a way to just do multiplication on said curves so we're not actually helped by those either.

@weixuefeng
Copy link
Author

ok

@paulmillr
Copy link

I would argue against this. This would make key-tree bigger...the use case is not defined/popular enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants