-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add support EcdsaSecp256k1Signature2019 #74
Comments
cc: @mattcollier -- we'll need to figure out what's going on with the above and https://github.com/digitalbazaar/ecdsa-secp256k1-signature-2019 ... hopefully they're doing the same thing or can be easily reconciled. |
Looks very similar, I can make sure to add interop tests with the above library once thats possible. Here's the direct link to the repo: https://github.com/decentralized-identity/lds-ecdsa-secp256k1-2019.js I based the linked implementation on https://w3c-dvcg.github.io/lds-ed25519-2018/ and followed the example implementation in https://github.com/digitalbazaar/jsonld-signatures/blob/master/lib/suites/Ed25519Signature2018.js The main difference currently is the lack of built in documentLoader. It would be easier to align implementations with a clearer spec, if you could provide comments on: w3c-ccg/lds-ecdsa-secp256k1-2019#2 and / or help author it, I would greatly appreciate it. You guys have much more experience with this stuff than I do :) |
I added support for the documentLoader, so our interfaces can be even closer. I've also added support for the Universal Resolver for DIDs. |
Related note... I'm not a huge fan of where the encoding and signing are happening under the current inheritance model: https://github.com/digitalbazaar/jsonld-signatures/blob/master/lib/util.js#L142 especially for JWS, with detached signatures. I would prefer to see the signature suite, in this case JOSE JWS, be called directly, and have it handle encoding, since it is supposed to handle encoding... This is probably more of a result of the lack of support for ES256K than anything else, but for example, I would expect the places where encoding happens to be different if we were supporting all valid JWS alg, for example here: https://www.npmjs.com/package/@panva/jose One of these days we will find ourselves in a situation where these non standard curves are not allowed :) |
note that the library above supports ES256K natively assuming you are running node 12. |
@msporny Would you / someone you know be interested in co-authoring / editing the spec for this:
w3c-ccg/lds-ecdsa-secp256k1-2019#2
I'm happy to help get this into jsonld-signatures, once the spec is formalized a bit more.
The text was updated successfully, but these errors were encountered: