Stellt Extension Methods für X509Certificate2 mit PQ-Unterstützung bereit.
namespace WvdS.System.Security.Cryptography.X509Certificates public static class X509Certificate2Extensions
| Name | Beschreibung |
|---|---|
| CopyWithPrivateKey(RSA, CryptoMode?) | Kopiert Zertifikat mit RSA Private Key und optionalem PQ-Key |
| CopyWithPrivateKey(ECDsa, CryptoMode?) | Kopiert Zertifikat mit ECDsa Private Key und optionalem PQ-Key |
| HasPqSignature() | Prüft ob PQ-Signatur-Extension vorhanden |
| GetCryptoMode() | Ermittelt den Krypto-Modus des Zertifikats |
| GetSignatureAlgorithmDescription() | Gibt lesbare Algorithmus-Beschreibung zurück |
Diese Extension-Klasse erweitert System.Security.Cryptography.X509Certificates.X509Certificate21).
using WvdS.System.Security.Cryptography.X509Certificates; var cert = new X509Certificate2("server.pfx", "password"); // PQ-Status prüfen if (cert.HasPqSignature()) { Console.WriteLine($"Modus: {cert.GetCryptoMode()}"); Console.WriteLine($"Algorithmus: {cert.GetSignatureAlgorithmDescription()}"); // Ausgabe: "RSA2048 + ML-DSA-65 (Hybrid)" }
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional