Skip to content

Add Private Key Agent support for signing and decryption - #97

Merged
tvdijen merged 3 commits into
masterfrom
feature/private-key-agent
Oct 6, 2026
Merged

tvdijen merged 3 commits into
masterfrom
feature/private-key-agent

Conversation

@tvdijen

@tvdijen tvdijen commented Jul 27, 2026

Copy link
Copy Markdown
Member

Prior to this change, RSA signing and RSA key-transport decryption could only be done with a private key loaded into the PHP process. For better security we need those two operations to be delegated to a remote Private Key Agent, so the private key never enters the application's memory, while public operations (verify, encrypt) keep running locally.

This change adds the extension points needed to route the private-key operations to the agent without breaking existing consumers. Insecure algorithms (SHA-1, RSA v1.5) stay blacklisted by default. As a hardening side effect, the key-transport read path now enforces the OAEP DigestMethod and MGF that were previously ignored.

Prior to this change, RSA signing and RSA key-transport decryption could
only be done with a private key loaded into the PHP process.
For better security we need those two operations to be delegated
to a remote Private Key Agent, so the private key never enters the
application's memory, while public operations (verify, encrypt) keep
running locally.

This change adds the extension points needed to route the private-key
operations to the agent without breaking existing consumers. Insecure
algorithms (SHA-1, RSA v1.5) stay blacklisted by default. As a hardening
side effect, the key-transport read path now enforces the OAEP
DigestMethod and MGF that were previously ignored.
@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.59459% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.33%. Comparing base (47b4ef5) to head (989a506).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #97      +/-   ##
============================================
+ Coverage     93.00%   93.33%   +0.33%     
- Complexity      766      908     +142     
============================================
  Files           125      133       +8     
  Lines          2917     3287     +370     
============================================
+ Hits           2713     3068     +355     
- Misses          204      219      +15     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tvdijen
tvdijen force-pushed the master branch 3 times, most recently from 7e77628 to 47b4ef5 Compare August 26, 2026 20:32
@tvdijen
tvdijen merged commit 1ccb48d into master Oct 6, 2026
30 checks passed
@tvdijen
tvdijen deleted the feature/private-key-agent branch October 6, 2026 18:41
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