Razred X509Certificate2Extensions

Zagotavlja razširitvene metode za X509Certificate2 s PQ-podporo.


Definicija

namespace WvdS.System.Security.Cryptography.X509Certificates
 
public static class X509Certificate2Extensions

Metode

Ime Opis
CopyWithPrivateKey(RSA, CryptoMode?) Kopira certifikat z zasebnim RSA-ključem in opcijskim PQ-ključem
CopyWithPrivateKey(ECDsa, CryptoMode?) Kopira certifikat z zasebnim ECDsa-ključem in opcijskim PQ-ključem
HasPqSignature() Preveri, ali je PQ-podpisna razširitev prisotna
GetCryptoMode() Določi kripto-način certifikata
GetSignatureAlgorithmDescription() Vrne berljiv opis algoritma

Opombe

Ta razred razširitev razširja System.Security.Cryptography.X509Certificates.X509Certificate21).


Primer

using WvdS.System.Security.Cryptography.X509Certificates;
 
var cert = new X509Certificate2("server.pfx", "password");
 
// Preverjanje PQ-statusa
if (cert.HasPqSignature())
{
    Console.WriteLine($"Način: {cert.GetCryptoMode()}");
    Console.WriteLine($"Algoritem: {cert.GetSignatureAlgorithmDescription()}");
    // Izpis: "RSA2048 + ML-DSA-65 (Hybrid)"
}

Glejte tudi


Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional

Zuletzt geändert: dne 29.01.2026 ob 23:42