-
Notifications
You must be signed in to change notification settings - Fork 16
Add PSS parameter encoding support in WolfCryptPssParameters #175
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
Conversation
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.
Pull Request Overview
This PR adds comprehensive RSASSA-PSS parameter encoding and decoding support to WolfCryptPssParameters, implementing RFC 4055 specification with proper default value semantics. The implementation correctly omits fields that match ASN.1 defaults from DER encoding.
Key Changes:
- Implements DER encoding/decoding for PSS parameters following RFC 4055 standards
- Adds ASN.1 utility methods for integer, OID, and NULL encoding/decoding
- Provides extensive test coverage with 20 new test cases covering various hash algorithms, salt lengths, and error conditions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| src/main/java/com/wolfssl/provider/jce/WolfCryptPssParameters.java | Implements PSS parameter encoding/decoding logic with RFC 4055 compliant default value omission |
| src/main/java/com/wolfssl/provider/jce/WolfCryptASN1Util.java | Adds ASN.1 utility methods for DER encoding/decoding of integers, OIDs, NULL values, and hash algorithm mappings |
| src/test/java/com/wolfssl/provider/jce/test/WolfCryptAlgorithmParametersTest.java | Adds comprehensive test coverage for PSS parameters including initialization, encoding, decoding, round-trip tests, and error cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/wolfssl/provider/jce/WolfCryptPssParameters.java
Outdated
Show resolved
Hide resolved
7e904cb to
08e3641
Compare
08e3641 to
a320475
Compare
This PR adds RSASSA-PSS parameter encoding support to
WolfCryptPssParameters.Encoding logic follows RFC 4055 default value semantics, fields matching ASN.1 defaults are omitted from DER encoding.
Fixes SunJCE test:
security/cert/X509Certificate/GetSigAlgParams.java