js-did-ipid
                                
                                 js-did-ipid copied to clipboard
                                
                                    js-did-ipid copied to clipboard
                            
                            
                            
                        Support for jwk / multicodec / did:key
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.
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
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?
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.
I opened: https://github.com/libp2p/js-libp2p-crypto/issues/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.