Namespace: WvdS.System.Security.Cryptography.X509Certificates
Extensions for X509Store with post-quantum key persistence. Enables saving and restoring PQ keys in the Windows Certificate Store.
| Method | Description |
|---|---|
Add(certificate, mode) | Adds certificate and persists PQ keys |
AddRange(collection, mode) | Adds multiple certificates |
Remove(certificate, deletePqKeys) | Removes certificate and optionally PQ keys |
Find(findType, findValue, validOnly, restorePqKeys) | Searches certificates and restores PQ keys |
GetCertificatesWithPqKeys() | All certificates with restored PQ keys |
| Method | Description |
|---|---|
PersistPqKeys(certificate) | Persists PQ keys manually |
RestorePqKeys(certificate) | Restores PQ keys manually |
DeletePqKeys(certificate) | Deletes persisted PQ keys |
HasPersistedPqKeys(certificate) | Checks if PQ keys exist |
using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadWrite); // Add certificate with PQ keys var hybridCert = CreateHybridCertificate(); store.Add(hybridCert, CryptoMode.Hybrid); // Search later and restore PQ keys var certs = store.Find( X509FindType.FindBySubjectName, "MyCertificate", validOnly: true, restorePqKeys: true);
| Operating System | Path |
|---|---|
| Windows | %LOCALAPPDATA%\WvdS.Crypto\PqKeys\ |
| Linux | ~/.local/share/WvdS.Crypto/PqKeys/ |
| macOS | ~/Library/Application Support/WvdS.Crypto/PqKeys/ |
CleanupOrphanedKeys() regularlyWolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional