Skip to content

Comments

Add support for RSASSA-PSS (PS256) algorithm#616

Merged
daneshk merged 10 commits intoballerina-platform:masterfrom
randilt:PS256_Implementation
Dec 9, 2025
Merged

Add support for RSASSA-PSS (PS256) algorithm#616
daneshk merged 10 commits intoballerina-platform:masterfrom
randilt:PS256_Implementation

Conversation

@randilt
Copy link
Contributor

@randilt randilt commented Dec 7, 2025

Purpose

Fixes #8292

This PR implements RSASSA-PSS (PS256) signature support for the Ballerina crypto library, addressing the current limitation where only classic RSA signatures (PKCS#1 v1.5) are available.

Examples

Sign data

crypto:PrivateKey privateKey = check crypto:decodeRsaPrivateKeyFromKeyStore(keyStore, "keyAlias", "keyPassword");
byte[] signature = check crypto:signRsaSsaPss256(data, privateKey);

Verify signature

crypto:PublicKey publicKey = check crypto:decodeRsaPublicKeyFromTrustStore(keyStore, "keyAlias");
boolean isValid = check crypto:verifyRsaSsaPss256Signature(data, signature, publicKey);

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

randilt and others added 10 commits December 7, 2025 09:46
* Refactor static code rule implementation

* Update spec with scan rules

* Update changelog

* Address sonar cloud reported issues

* Add enable code coverage report for compiler plugin

* Bump to the next minor version

* [Automated] Update the native jar versions

* Improve code coverage

* Update AES encryption example from CCM to CBC

* Fix reference to SHA256 in password hashing function
Co-authored-by: Thisaru Guruge <thisaru@wso2.com>
Co-authored-by: DimuthuMadushan <35717653+DimuthuMadushan@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 7, 2025

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.14%. Comparing base (cf1437f) to head (2cfae64).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #616      +/-   ##
============================================
- Coverage     82.32%   82.14%   -0.19%     
- Complexity      241      371     +130     
============================================
  Files            29       41      +12     
  Lines          1375     1725     +350     
  Branches        191      268      +77     
============================================
+ Hits           1132     1417     +285     
- Misses          196      215      +19     
- Partials         47       93      +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@randilt randilt marked this pull request as ready for review December 7, 2025 04:59
@randilt
Copy link
Contributor Author

randilt commented Dec 7, 2025

@DimuthuMadushan @daneshk I have created a new PR with only the commits that are related to this feature, which were already reviewed in the previous PR

Copy link
Contributor

@DimuthuMadushan DimuthuMadushan left a comment

Choose a reason for hiding this comment

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

LGTM!

@daneshk daneshk merged commit 8704865 into ballerina-platform:master Dec 9, 2025
8 checks passed
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.

Add support for RSASSA-PSS (PS256) algorithm

4 participants