auth0 / node-jwa

JSON Web Algorithms
http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html
MIT License
98 stars 42 forks source link

Implement RSASSA-PSS (PS) signing and verifying #21

Closed csprl closed 5 years ago

csprl commented 6 years ago

This would be useful for https://github.com/brianloveswords/node-jws/issues/47

omsmith commented 6 years ago

Hi @csprl. Thanks for the contribution.

Would it be possible for you to add some tests to the test suite for this?

csprl commented 6 years ago

Hey, I added tests (based on the existing ones for "regular" RSA). It does however seem like support for PSS padding wasn't added until Node.js v6. Function arguments for Verify.verify() were also changed in v7, but back again to the v6 behaviour in v8 which is why the v7 build is failing. Considering these Node.js versions aren't officially supported anymore it might make sense to drop support for them.

omsmith commented 6 years ago

Perfect thanks. I'll update the support matrix on travis later today. I'm still going to keep the old old versions, as I don't want to do a major bump at the moment. I think what we can do is

csprl commented 6 years ago

Sounds good. I added checks for Node version and pinpointed 6.12.0 to be the exact release when PSS support was added. I also added a notice in README.md.

omsmith commented 6 years ago

That's awesome, thanks for being so responsive to feedback and sorry that I took a while to hop on this!

I'll aim to get this out tonight, but I realized that https://github.com/brianloveswords/node-jwa/pull/26 may have a couple issues with https://github.com/crypto-browserify/browserify-sign that I'll want to address first (perhaps by just reverting my change for now in order to get yours out).

csprl commented 6 years ago

No worries at all! You absolutely don't have to rush this change, but getting PS support in node-jws in the near future would be great.

nikolaymatrosov commented 5 years ago

It would be great if this PR was merged, so all dependent packages obtain the ability to use PS* algorithms.