7. Verschlüsselung
Szenarien: 3
FFI-Funktionen: ~25
Status: ⏳ Geplant
Diese Kategorie umfasst alle Szenarien zur Post-Quantum-sicheren Verschlüsselung. Hybrid-Encryption mit ML-KEM, Key Encapsulation und symmetrische Verschlüsselung.
Szenarien
| ID | Szenario | Beschreibung | Komplexität | Status |
|---|---|---|---|---|
| 7.1 | Hybrid-Encryption | ECDH + ML-KEM kombiniert | ⭐⭐⭐⭐ | ⏳ |
| 7.2 | Key Encapsulation | ML-KEM für Schlüsselaustausch | ⭐⭐⭐ | ⏳ |
| 7.3 | Datei-Verschlüsselung | Große Dateien verschlüsseln | ⭐⭐⭐ | ⏳ |
Hybrid-Encryption Workflow
sequenceDiagram
participant A as Alice (Sender)
participant B as Bob (Empfänger)
Note over B: Schlüsselpaar generieren
B->>A: Public Key (ECDH + ML-KEM)
Note over A: Key Encapsulation
A->>A: ECDH SharedSecret + ML-KEM Ciphertext
A->>A: HKDF(ECDH || ML-KEM) → KEK
A->>A: AES-GCM Encrypt(KEK, Plaintext)
A->>B: ECDH Ephemeral PK + ML-KEM Ciphertext + AES Ciphertext
Note over B: Key Decapsulation
B->>B: ECDH SharedSecret + ML-KEM Decapsulate
B->>B: HKDF(ECDH || ML-KEM) → KEK
B->>B: AES-GCM Decrypt(KEK, Ciphertext)
Algorithmen
| Komponente | Algorithmus | Sicherheitsniveau | Standard |
|---|---|---|---|
| Key Encapsulation (PQ) | ML-KEM-768 | 192 Bit | NIST FIPS 203 |
| Key Exchange (klassisch) | ECDH P-384 | 192 Bit | NIST SP 800-56A |
| Key Derivation | HKDF-SHA384 | - | RFC 5869 |
| Symmetric Encryption | AES-256-GCM | 256 Bit | NIST SP 800-38D |
Hybrid-Prinzip: Beide Algorithmen (ECDH + ML-KEM) müssen gebrochen werden, um die Verschlüsselung zu kompromittieren.
Einsatzszenarien
| Anwendung | Empfohlener Modus | Begründung |
|---|---|---|
| Langzeit-Archivierung | ML-KEM (PQ-only) | Daten müssen 20+ Jahre sicher bleiben |
| Aktuelle Kommunikation | Hybrid | Kompatibilität + Zukunftssicherheit |
| Legacy-Systeme | ECDH (Classic) | Keine PQ-Unterstützung |
Code-Schnellstart
Hybrid-Encryption
using WvdS.Security.Cryptography.Extensions.PQ; // Empfänger: Schlüsselpaar generieren using var recipientKey = ctx.GenerateHybridKeyPair( classicAlgorithm: EcdhCurve.P384, pqAlgorithm: PqAlgorithm.MlKem768 ); var publicKeyPem = recipientKey.ExportPublicKeyPem(); // Sender: Verschlüsseln var (ciphertext, encapsulatedKey) = ctx.HybridEncrypt( plaintext: Encoding.UTF8.GetBytes("Geheime Nachricht"), recipientPublicKey: publicKeyPem ); // Empfänger: Entschlüsseln var plaintext = ctx.HybridDecrypt( ciphertext: ciphertext, encapsulatedKey: encapsulatedKey, privateKey: recipientKey );
Datei-Verschlüsselung
// Große Datei verschlüsseln (Streaming) await ctx.EncryptFileAsync( inputPath: "dokument.pdf", outputPath: "dokument.pdf.enc", recipientPublicKey: publicKeyPem, mode: CryptoMode.Hybrid ); // Entschlüsseln await ctx.DecryptFileAsync( inputPath: "dokument.pdf.enc", outputPath: "dokument-decrypted.pdf", privateKey: recipientKey );
Verwandte Kategorien
| Kategorie | Beziehung |
|---|---|
| 11. Schlüsselmanagement | Schlüsselpaare verwalten |
| 10. TLS/mTLS | Key Exchange im TLS-Handshake |
| 12. Import/Export | Verschlüsselte Schlüssel exportieren |
« ← 6. Widerruf | ↑ Szenarien | 8. Digitale Signaturen → »
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional
Zuletzt geändert: den 29.01.2026 um 15:13