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

feat: Add PS256, PS384 and PS512 support #56

Merged
merged 6 commits into from
May 14, 2019
Merged

feat: Add PS256, PS384 and PS512 support #56

merged 6 commits into from
May 14, 2019

Conversation

Andrew-Lees11
Copy link
Contributor

This pull request adds two now signers and verifiers for the PS256 and PS384 JWT algorithms.
These use the new RSA-PSS support introduced in BlueRSA 1.0.31.

Tests have been added for sign -> verify cycle and against the JWT.io implementation by using a JWT they generated and generating a JWT that is then verfied on JWT.io.

This adds the functionality requested by issue #55.

Copy link
Contributor

@djones6 djones6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add support for PS512 too, so that we support all of the algorithms listed on jwt.io
And if you think it's appropriate, add a doc comment regarding the minimum key size.

@djones6
Copy link
Contributor

djones6 commented May 14, 2019

Also your tests are failing on MacOS with Swift 4.0.3:
https://travis-ci.org/IBM-Swift/Swift-JWT/jobs/532313469

This may be because the xcode image is too old (xcode9.2 seems to give you MacOS 10.12.6)

@Andrew-Lees11 Andrew-Lees11 changed the title feat: Add PS256 and PS384 support feat: Add PS256, PS384 and PS512 support May 14, 2019
@Andrew-Lees11
Copy link
Contributor Author

I have updated our RSA key to be 2048 bit so that it can be used for ps512. I have also added if available calls to our tests since RSA-PSS requires MacOS 10.13.

Copy link
Contributor

@djones6 djones6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@djones6 djones6 merged commit 2783f00 into master May 14, 2019
@Andrew-Lees11 Andrew-Lees11 deleted the ps256 branch May 24, 2019 08:47
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

Successfully merging this pull request may close these issues.

2 participants