Open dileepbapat opened 3 years ago
@dileepbapat - you're correct, a standalone RSA suite is not implemented at this point. (We don't really use it in any of our use cases / deployments.) For what it's worth, there is PR https://github.com/digitalbazaar/rsa-signature-2018/pull/1, which does have the code extracted from jsonld-signatures. It's just not really used/tested.
@dmitrizagidulin I've tested with the latest version of vc.js with rn branch, and it works well. Could you please merge the PR #1?
@uocnb - oh, hey, good to know! :) Thanks for testing it.
Hi @uocnb. Did it worked out of the box for you?
I'm generating my credentials with https://github.com/danubetech/verifiable-credentials-java. It generates them with RS256 ALG. I changed the algorithm in RsaSignature2018.js, and removed the "pss" attributes and salts in the RsaVerificationKey2018.js, but I am always getting "Invalid Signature". Might be also related to the way both libraries calculate the data that is going to be validated against the signature.
BTW, I also tried generating (java) and validating (js) credentials with ED25519 and works ok.
Just in case, reproducer here: https://github.com/fabrii/dc-playground
Thanks
Found out that the RsaSignature2018 is working perfectly. The problem is that the received "verifyData" byte array is different on javascript vs java library. I am digging a bit further to know why.
Seems to be related to an error in the canonicalization process.
Opened an issue upstream: https://github.com/digitalbazaar/jsonld.js/issues/524
@dmitrizagidulin, I would really appreciate if you could take a look and tell me what you think.
Thanks!
Hi @fabrii, as I remember it required few changes to make it work. It's long time already when I'm working with this. The implementation can be found here: https://github.com/idpass/inji. See the package.json for details.
Good luck!
I made it work. The suite is working ok. The problem is with the canonicalization process. More info in the issue opened in digitalbazar.
Thanks.
https://github.com/digitalbazaar/rsa-signature-2018/blob/master/lib/RsaSignature2018.js
Above file defines an empty object, is it missing implementation?
Change: https://github.com/digitalbazaar/jsonld-signatures/blob/master/CHANGELOG.md#800---2021-03-18 moves signature suites into its own repo (which is this)