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

Support for jwk / multicodec / did:key #20

Open
OR13 opened this issue Jun 2, 2020 · 4 comments
Open

Support for jwk / multicodec / did:key #20

OR13 opened this issue Jun 2, 2020 · 4 comments

Comments

@OR13
Copy link

OR13 commented Jun 2, 2020

The DID Core spec allows the use of JWK keys for all verification methods... because of this, they are a better interoperability target than PEM.

If the representations supported here: https://github.com/w3c-ccg/lds-jws2020

Don't cover the cryptographic primitives needed for IPID, I would be glad to know that.

@satazor
Copy link
Contributor

satazor commented Jun 8, 2020

It seems that libp2p crypto has no support for jwk. Ideally the support should be added there to avoid having adoc integrations here.

//cc @vasco-santos

@vasco-santos
Copy link
Member

We have some "on going"/"to start" efforts regarding crypto in libp2p:

We can eventually get jwk keys to the crypto roadmap. @OR13 Can you start by creating an issue in the libp2p/js-libp2p-crypto module?

@OR13
Copy link
Author

OR13 commented Jun 9, 2020

does lib p2p support multicodec / base58 ? Its possible that is also a better future facing target than PEM.

I recently implemented support for did:key with secp256k1, and added support for cross conversion from base58 / hex / jwk here: https://github.com/transmute-industries/did-key.js

Seems like from https://github.com/libp2p/js-libp2p-crypto#cryptokeys

Ideally did:ipid would support RSA, Ed25519 and Secp256k1 + NIST Curves as JWKs / base58... base58 might be more in the spirit of IPFS.

There is an intermediary representation for keys which makes support for DIDs easier, here is an example for secp256k1: https://github.com/transmute-industries/did-key.js/blob/master/packages/did-key-secp256k1/src/Secp256k1KeyPair.ts

I would expect ipid to rely on something like this wrapped around libp2p/js-libp2p-crypto.

@OR13
Copy link
Author

OR13 commented Jun 9, 2020

I opened: libp2p/js-libp2p-crypto#177

I'm not sure about the best way to layer these things, but I'd personally love to see less PEM and JWK and more multicodec.

@OR13 OR13 changed the title Support for JWK Keys Support for jwk / multicodec / did:key Jun 9, 2020
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