Namespace: WvdS.System.Security.Cryptography.KeyDerivation
Contiene classi per la derivazione delle chiavi (KDF) con supporto PQ.
| Classe | Descrizione |
|---|---|
| KeyDerivationExtensions | Funzioni KDF (HKDF, PBKDF2, Argon2id) |
| HybridKeyMaterial | Container per chiavi derivate |
| TlsKeyMaterial | Materiale chiavi stile TLS |
| Tls13KeySchedule | Key Schedule TLS 1.3 |
| Funzione | Standard | Utilizzo |
|---|---|---|
| HKDF | RFC 58691) | Chiavi di sessione da Shared Secret |
| PBKDF2 | RFC 80182) | Chiavi basate su password |
| Argon2id | RFC 91063) | KDF memory-hard |
using WvdS.System.Security.Cryptography.KeyDerivation; byte[] sharedSecret = /* da ML-KEM */; byte[] salt = RandomNumberGenerator.GetBytes(32); // HKDF per chiavi di sessione byte[] aesKey = KeyDerivationExtensions.DeriveKey( sharedSecret, outputLength: 32, salt: salt, info: Encoding.UTF8.GetBytes("AES-256-GCM")); // Derivazione chiavi ibrida byte[] hybridKey = KeyDerivationExtensions.DeriveHybridKey( classicSecret: ecdhSecret, pqSecret: mlKemSecret, outputLength: 32);
| Metodo | Descrizione |
|---|---|
DeriveKey | HKDF-Extract-then-Expand |
HkdfExtract | Estrae PRK da IKM |
HkdfExpand | Espande PRK in Output Key |
| Metodo | Descrizione |
|---|---|
DeriveHybridKey | Combina secret classici + PQ |
DeriveHybridKeyMaterial | Deriva chiavi multiple |
| Metodo | Descrizione |
|---|---|
Pbkdf2 | PBKDF2 standard con entropy PQ opzionale |
Pbkdf2WithPqSalt | PBKDF2 con salt rafforzato PQ |
Argon2id | KDF memory-hard via OpenSSL 3.6 |
| Metodo | Descrizione |
|---|---|
DeriveTlsKeys | Key Material stile TLS 1.2 |
DeriveTls13Keys | Key Schedule TLS 1.3 |
| Applicazione | Iterations (t) | Memory (m) | Parallelism (p) |
|---|---|---|---|
| Hashing password | 3 | 64 MB | 4 |
| Alta sicurezza | 4 | 256 MB | 4 |
| Low-Memory | 4 | 16 MB | 4 |
Sicurezza modalita Hybrid:
In modalita Hybrid, la chiave finale viene compromessa solo se ENTRAMBI i secret (classico E PQ) vengono violati. Questo fornisce protezione sia contro attacchi classici che quantistici.
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional