mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.crypto: add hybrid post-quantum/traditional key encapsulation
Hybrid KEMs combine a post-quantum secure KEM with a traditional elliptic curve Diffie-Hellman key exchange. The hybrid construction provides security against both classical and quantum adversaries: even if one component is broken, the combined scheme remains secure as long as the other component holds. The implementation follows the IETF CFRG draft specification for concrete hybrid KEMs: https://datatracker.ietf.org/doc/draft-irtf-cfrg-concrete-hybrid-kems/
This commit is contained in:
parent
854774d468
commit
ca96d853ff
2 changed files with 1090 additions and 0 deletions
|
|
@ -116,6 +116,7 @@ pub const dh = struct {
|
|||
|
||||
/// Key Encapsulation Mechanisms.
|
||||
pub const kem = struct {
|
||||
pub const hybrid = @import("crypto/hybrid_kem.zig");
|
||||
pub const kyber_d00 = @import("crypto/ml_kem.zig").d00;
|
||||
pub const ml_kem = @import("crypto/ml_kem.zig").nist;
|
||||
};
|
||||
|
|
|
|||
1089
lib/std/crypto/hybrid_kem.zig
Normal file
1089
lib/std/crypto/hybrid_kem.zig
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue