key-tree icon indicating copy to clipboard operation
key-tree copied to clipboard

Can i got private key which derived by Nist256p1 ?

Open weixuefeng opened this issue 3 years ago • 7 comments

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

weixuefeng avatar Apr 17 '22 09:04 weixuefeng

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

weixuefeng avatar Apr 17 '22 15:04 weixuefeng

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 avatar Apr 18 '22 14:04 rekmarks

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

weixuefeng avatar Apr 20 '22 12:04 weixuefeng

@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 avatar May 09 '22 21:05 rekmarks

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.

rekmarks avatar May 10 '22 15:05 rekmarks

ok

weixuefeng avatar May 14 '22 14:05 weixuefeng

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

paulmillr avatar Jul 22 '22 14:07 paulmillr