Skip to content

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

Open
tvdijen wants to merge 1 commit into
masterfrom
feature/private-key-agent
Open

Add Private Key Agent support for signing and decryption#97
tvdijen wants to merge 1 commit 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.31%. Comparing base (b1524ff) to head (bda9645).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #97      +/-   ##
============================================
+ Coverage     92.97%   93.31%   +0.33%     
- Complexity      763      905     +142     
============================================
  Files           125      133       +8     
  Lines          2905     3275     +370     
============================================
+ Hits           2701     3056     +355     
- Misses          204      219      +15     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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