Add configurable OAEP and MGF1 to RSA operations - #246
Merged
Conversation
Release v1.3.6
Bumps [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) from 2.19.2 to 2.21.1. - [Commits](FasterXML/jackson-core@jackson-core-2.19.2...jackson-core-2.21.1) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-core dependency-version: 2.21.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…kson.core-jackson-core-2.21.1 Bump com.fasterxml.jackson.core:jackson-core from 2.19.2 to 2.21.1
The RSA Encryption/Decryption operations previously only did RSA/ECB/ PKCS1Padding in PEM mode, and in KeyStore mode relied on named OAEP transformations (e.g. OAEPWITHSHA-256ANDMGF1PADDING) which silently keep MGF1 at SHA-1 under SunJCE. Neither could reproduce a common client-side config such as forge's RSA-OAEP with SHA-256 for both the OAEP and MGF1 digests. Introduce RsaCipherBuilder, a small helper that builds an RSA Cipher from a padding plus, for OAEP, an explicit OAEPParameterSpec with independently selectable OAEP and MGF1 message digests. Both operations now expose 'Padding', 'OAEP Hash' and 'MGF1 Hash' dropdowns in PEM and KeyStore mode; the hash fields are shown only while OAEP is selected. Defaults stay on PKCS1Padding so existing recipes are unaffected. KeyStore padding choices are sourced from the provider but always include an OAEP option, since some JVMs (incl. Burp's bundled JRE) advertise a reduced RSA padding list that omits OAEP. Add RsaCipherBuilderTest covering OAEP round-trips, mixed digests, PKCS1 backward-compat and the KeyStore padding fallbacks.
Add configurable RSA-OAEP support (selectable OAEP & MGF1 digests)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For RSA operations, the hash functions for OAEP and MGF1 can now be selected separately, allowing for more granular control.