Skip to content

Modernize Smart Certificate KeyProvider#17

Open
anthonyadavisii wants to merge 2 commits intoBodnarSoft:masterfrom
anthonyadavisii:patch-1
Open

Modernize Smart Certificate KeyProvider#17
anthonyadavisii wants to merge 2 commits intoBodnarSoft:masterfrom
anthonyadavisii:patch-1

Conversation

@anthonyadavisii
Copy link
Copy Markdown

  • Replaced legacy certificate.PrivateKey usage with certificate.GetRSAPrivateKey() to align with current Windows cryptography APIs (CNG).
  • Verified compatibility with x64 portable KeePass 2.60.
  • Updated build configuration to target .NET Framework 4.8 and x64 architecture.
  • Adjusted output path for direct deployment into KeePass’s Plugins folder.

Compatibility Notes

  • New databases created with this plugin encrypt/decrypt successfully with pivkey smart cards. Additional hardware testing would be prudent.
  • Legacy databases originally encrypted under CSP providers may not open on modern OS builds.

Replaced legacy certificate.PrivateKey usage with certificate.GetRSAPrivateKey() to align with current Windows cryptography APIs (CNG).
@anthonyadavisii anthonyadavisii deleted the patch-1 branch December 6, 2025 16:53
@anthonyadavisii anthonyadavisii restored the patch-1 branch December 9, 2025 17:49
@anthonyadavisii
Copy link
Copy Markdown
Author

I attempted fix in PR #15 in hope that it would resolve issues with legacy databases but it gave me the invalid provider error despite the very minor differences. This patch appears successful in encrypting / decrypting new databases but remains unable to decrypt legacy databases. It seems like the only alternative would be to decrypt on a Windows OS that supports the legacy CSPs but I have yet to attempt.

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.

1 participant