Skip to content

feat: Add PS256, PS384 and PS512 support#56

Merged
djones6 merged 6 commits intomasterfrom
ps256
May 14, 2019
Merged

feat: Add PS256, PS384 and PS512 support#56
djones6 merged 6 commits intomasterfrom
ps256

Conversation

@Andrew-Lees11
Copy link
Copy Markdown
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.

@Andrew-Lees11 Andrew-Lees11 requested a review from djones6 May 14, 2019 13:55
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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