Add RSA PKCSv1.5 padding support for legacy compat #425
+80
−1
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.
Add RSA PKCSv1.5 padding support for legacy compat
Checklist
If you've made changes to
gybfiles./scripts/generate_boilerplate_files_with_gyb.shand included updated generated files in a commit of this pull requestMotivation:
I have a scenario that requires me to be able to encrypt and decrypt values that use RSA PKCSv1.5 padding. This is known to be a weak algorithm, so we explicitly want to discourage its use, but there are scenarios where you need the algorithm for legacy compatibility, so we want to provide the capability, even if we strongly discourage its use.
Modifications:
Added a new enum + constant + passthrough to allow users to specify RSA PKCSv1.5. From the internal review, we thought it would be best to explicitly name the constants in a way that discouraged use without very intentional needs, hence the "weak" and "insecure" references in all of the naming.
Result:
You can now specify PKCSv1.5 padding for use in encryption and decryption. This is only adding constants, and the enums are not public, so there should not be any impact on compatibility (source or binary).