Skip to content

Define an enum for the RSA padding scheme #162

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

Merged
merged 3 commits into from
Mar 10, 2020
Merged

Conversation

WesleyRosenblum
Copy link
Contributor

@WesleyRosenblum WesleyRosenblum commented Mar 9, 2020

Description of changes:

Define an enum for the RSA padding scheme #160

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

Copy link
Contributor

@SalusaSecondus SalusaSecondus left a comment

Choose a reason for hiding this comment

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

Comment change is required. Pre-creating the spec can wait.

return new RawRsaKeyring(keyNamespace, keyName, publicKey, privateKey, paddingScheme);
}

public enum RsaPaddingScheme {
Copy link
Contributor

Choose a reason for hiding this comment

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

NitPick: For ease of use, calculate the correct OAEPParameterSpec instances for each of these (they are immutable) and just pull them from the enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll hold off on this until Master Keys are deleted

Comment on lines +118 to +119
* The Cipher transformation standard name as specified in
* https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#Cipher
Copy link
Contributor

Choose a reason for hiding this comment

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

This is almost correct. Please clarify that in all cases the hash function used with MGF1 is the same as the hash function used directly with the message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@WesleyRosenblum WesleyRosenblum merged commit 2055728 into keyring Mar 10, 2020
@WesleyRosenblum WesleyRosenblum deleted the paddingenum branch April 2, 2020 18:32
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