Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update liboqs, add ml-kem / ml-dsa #259

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
feat: added ml_kem [ML-KEM-512-ipd (alias: ML-KEM-512), ML-KEM-768-ip…
…d (alias: ML-KEM-768), ML-KEM-1024-ipd (alias: ML-KEM-1024)]

Signed-off-by: Ferdinand Linnenberg <[email protected]>
  • Loading branch information
Scarjit committed Apr 10, 2024
commit 5a6e990ae891722f396113bde91a601ec086158c
3 changes: 2 additions & 1 deletion oqs-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -30,13 +30,14 @@ docs = []
non_portable = []
vendored = []
# algorithms: KEMs
kems = ["classic_mceliece", "frodokem", "hqc", "kyber", "ntruprime"]
kems = ["classic_mceliece", "frodokem", "hqc", "kyber", "ntruprime", "ml_kem"]
bike = [] # BIKE is enabled by build.rs on non-windows targets
classic_mceliece = []
frodokem = []
hqc = []
kyber = []
ntruprime = []
ml_kem = []
# algorithms: Signature schemes
sigs = ["dilithium", "falcon", "sphincs"]
dilithium = []
1 change: 1 addition & 0 deletions oqs-sys/build.rs
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ fn build_from_source() -> PathBuf {
algorithm_feature!("KEM", "hqc");
algorithm_feature!("KEM", "kyber");
algorithm_feature!("KEM", "ntruprime");
algorithm_feature!("KEM", "ml_kem");

// signature schemes
algorithm_feature!("SIG", "dilithium");
3 changes: 2 additions & 1 deletion oqs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -26,13 +26,14 @@ non_portable = ["oqs-sys/non_portable"]
vendored = ["oqs-sys/vendored"]

# algorithms: KEMs
kems = ["oqs-sys/kems", "classic_mceliece", "frodokem", "hqc", "kyber", "ntruprime"]
kems = ["oqs-sys/kems", "classic_mceliece", "frodokem", "hqc", "kyber", "ntruprime", "ml_kem"]
bike = ["oqs-sys/bike"] # not supported on Windows or 32-bit ARM
classic_mceliece = ["oqs-sys/classic_mceliece"]
frodokem = ["oqs-sys/frodokem"]
hqc = ["oqs-sys/hqc"]
kyber = ["oqs-sys/kyber"]
ntruprime = ["oqs-sys/ntruprime"]
ml_kem = ["oqs-sys/ml_kem"]
# algorithms: Signature schemes
sigs = ["oqs-sys/sigs", "dilithium", "falcon", "sphincs"]
dilithium = ["oqs-sys/dilithium"]
6 changes: 6 additions & 0 deletions oqs/src/kem.rs
Original file line number Diff line number Diff line change
@@ -140,6 +140,12 @@ implement_kems! {
("frodokem") FrodoKem976Shake: OQS_KEM_alg_frodokem_976_shake,
("frodokem") FrodoKem1344Aes: OQS_KEM_alg_frodokem_1344_aes,
("frodokem") FrodoKem1344Shake: OQS_KEM_alg_frodokem_1344_shake,
("ml_kem") MlKem512Ipd: OQS_KEM_alg_mlkem_512_ipd,
("ml_kem") MlKem768Ipd: OQS_KEM_alg_mlkem_768_ipd,
("ml_kem") MlKem1024Ipd: OQS_KEM_alg_mlkem_1024_ipd,
("ml_kem") MlKem512: OQS_KEM_alg_mlkem_512,
("ml_kem") MlKem768: OQS_KEM_alg_mlkem_768,
("ml_kem") MlKem1024: OQS_KEM_alg_mlkem_1024,
}

impl Algorithm {