-
Notifications
You must be signed in to change notification settings - Fork 116
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
WIP: Add RSAES-OAEP support #95
Merged
12 commits merged into
airsidemobile:resolve-conflicts-95
from
garrefa:add-RSAES-OAEP-support
Feb 10, 2019
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
78c8754
Add RSAES_OAEP type to AsymmetricKeyAlgorithm
83ad051
Adds AsymmetricKeyAlgorithm.RSAES_OAEP and implements plain text and …
81981f9
Add encrypter for (RSAES_OAEP, A256CBCHS512)
39ade5f
Add decrypter for (RSAES_OAEP, A256CBCHS512)
06a476a
Merge branch 'master' into add-RSAES-OAEP-support
garrefa 9f5f898
Merge pull request #1 from airsidemobile/master
garrefa 352bd19
Rename new AsymmetricKeyAlgorithm case to RSAOAEP
garrefa 6762d40
Fix length checks
garrefa 76e74aa
Merge remote-tracking branch 'upstream/master'
7d54f6f
Merge latest master in
7454a3d
Add Encrypter Tests
f342566
Add Decrypter Tests
garrefa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Add RSAES_OAEP type to AsymmetricKeyAlgorithm
- Loading branch information
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little picky but, I think we should name it like in the JWA rfc, as the underscore in
RSA1_5
is only because the algorithm parameter is named like this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum... in this case whats your suggestion for the name? The RFC uses
RSAES-OAEP
or RSAES OAEP, both are not possible in swift enums.RSAESOAEP
? justOAEP
?Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry 🤦♂️ forgot about that. Looking at the SymmetricKeyAlgorithm,
A256CBC-HS512
is written asA256CBCHS512
, soRSAESOAEP
it is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right @garrefa 🙂
-
is not possible in Swift enums.Guys, the "alg" parameter value is
RSA-OAEP
notRSAES-OAEP
according to the RFC. What do you think ofRSA_OAEP
ofRSAOAEP
?@garrefa If you have any suggestion for a more consistent naming scheme, we'd be happy to adopt it. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would go for
RSAOAEP
😁There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello guys. I think it's amazing that you decided to fill the gap and create this library. It is super useful for newbies in cartography like me.
I just want to let you know @garrefa that I did some testing of this branch and it seems that JwtSecurityTokenHandler class from .NET framework is not able to decode tokens with
"alg": "RSAES-OAEP"
parameter in the header, yet it works fine withRSA-OAEP
version. I think that it may be connected with @daniel-mohemian's suggestion that according to RFC standard this param should has valueRSA-OAEP
.