Inhaltsverzeichnis

Imenski prostor WvdS.System.Security.Cryptography.KeyDerivation

Vsebuje razrede za izpeljavo ključev (KDF) s podporo PQ.


Razredi

Razred Opis
KeyDerivationExtensions Funkcije KDF (HKDF, PBKDF2, Argon2id)
HybridKeyMaterial Vsebnik za izpeljane ključe
TlsKeyMaterial Ključni material v stilu TLS
Tls13KeySchedule Razpored ključev TLS 1.3

Podprte funkcije KDF

Funkcija Standard Uporaba
HKDF RFC 58691) Sejni ključi iz skupne skrivnosti
PBKDF2 RFC 80182) Ključi na podlagi gesla
Argon2id RFC 91063) KDF, odporen na pomnilnik

Primer

using WvdS.System.Security.Cryptography.KeyDerivation;
 
byte[] sharedSecret = /* iz ML-KEM */;
byte[] salt = RandomNumberGenerator.GetBytes(32);
 
// HKDF za sejne ključe
byte[] aesKey = KeyDerivationExtensions.DeriveKey(
    sharedSecret,
    outputLength: 32,
    salt: salt,
    info: Encoding.UTF8.GetBytes("AES-256-GCM"));
 
// Hibridna izpeljava ključev
byte[] hybridKey = KeyDerivationExtensions.DeriveHybridKey(
    classicSecret: ecdhSecret,
    pqSecret: mlKemSecret,
    outputLength: 32);

Glejte tudi


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