From 759c7bf7324a42da05167b17130ff6c23911eee9 Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:07:24 +0200 Subject: [PATCH 1/7] chore(oqs-sys): bump liboqs version to 0.10.0, bump version to 0.10.0+liboqs-0.10.0 Signed-off-by: Ferdinand Linnenberg --- oqs-sys/Cargo.toml | 2 +- oqs-sys/liboqs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oqs-sys/Cargo.toml b/oqs-sys/Cargo.toml index 6d24ac0dbf..b2142d7b68 100644 --- a/oqs-sys/Cargo.toml +++ b/oqs-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oqs-sys" -version = "0.9.1+liboqs-0.9.0" +version = "0.10.0+liboqs-0.10.0" authors = ["Thom Wiggers "] edition = "2021" links = "oqs" diff --git a/oqs-sys/liboqs b/oqs-sys/liboqs index 7c3a0e9aa7..36be57445d 160000 --- a/oqs-sys/liboqs +++ b/oqs-sys/liboqs @@ -1 +1 @@ -Subproject commit 7c3a0e9aa7f9568e4dcafaf908ff8aa0008f0b71 +Subproject commit 36be57445d8ca53f7095160fde548efe82ace09d From 5a6e990ae891722f396113bde91a601ec086158c Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:19:07 +0200 Subject: [PATCH 2/7] feat: added ml_kem [ML-KEM-512-ipd (alias: ML-KEM-512), ML-KEM-768-ipd (alias: ML-KEM-768), ML-KEM-1024-ipd (alias: ML-KEM-1024)] Signed-off-by: Ferdinand Linnenberg --- oqs-sys/Cargo.toml | 3 ++- oqs-sys/build.rs | 1 + oqs/Cargo.toml | 3 ++- oqs/src/kem.rs | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/oqs-sys/Cargo.toml b/oqs-sys/Cargo.toml index b2142d7b68..f021edcced 100644 --- a/oqs-sys/Cargo.toml +++ b/oqs-sys/Cargo.toml @@ -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 = [] diff --git a/oqs-sys/build.rs b/oqs-sys/build.rs index 4e4560c9a9..287307bb78 100644 --- a/oqs-sys/build.rs +++ b/oqs-sys/build.rs @@ -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"); diff --git a/oqs/Cargo.toml b/oqs/Cargo.toml index 770e7b297b..3d1d8ff93d 100644 --- a/oqs/Cargo.toml +++ b/oqs/Cargo.toml @@ -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"] diff --git a/oqs/src/kem.rs b/oqs/src/kem.rs index 2f9d6e4efe..43d694d65c 100644 --- a/oqs/src/kem.rs +++ b/oqs/src/kem.rs @@ -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 { From 1f451144ec53ed68398e359443f78223604edc6f Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:24:27 +0200 Subject: [PATCH 3/7] feat: added ml_kem [ML-DSA-44-ipd (alias: ML-DSA-44), ML-DSA-65-ipd (alias: ML-DSA-65), ML-DSA-87-ipd (alias: ML-DSA-87)] Signed-off-by: Ferdinand Linnenberg --- oqs-sys/Cargo.toml | 3 ++- oqs-sys/build.rs | 1 + oqs/Cargo.toml | 3 ++- oqs/src/sig.rs | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/oqs-sys/Cargo.toml b/oqs-sys/Cargo.toml index f021edcced..f407491de6 100644 --- a/oqs-sys/Cargo.toml +++ b/oqs-sys/Cargo.toml @@ -39,10 +39,11 @@ kyber = [] ntruprime = [] ml_kem = [] # algorithms: Signature schemes -sigs = ["dilithium", "falcon", "sphincs"] +sigs = ["dilithium", "falcon", "sphincs", "ml_dsa"] dilithium = [] falcon = [] sphincs = [] +ml_dsa = [] [package.metadata.docs.rs] features = ["docs"] diff --git a/oqs-sys/build.rs b/oqs-sys/build.rs index 287307bb78..a11dc4f81b 100644 --- a/oqs-sys/build.rs +++ b/oqs-sys/build.rs @@ -75,6 +75,7 @@ fn build_from_source() -> PathBuf { algorithm_feature!("SIG", "dilithium"); algorithm_feature!("SIG", "falcon"); algorithm_feature!("SIG", "sphincs"); + algorithm_feature!("SIG", "ml_dsa"); if cfg!(windows) { // Select the latest available Windows SDK diff --git a/oqs/Cargo.toml b/oqs/Cargo.toml index 3d1d8ff93d..c5baaa3fc4 100644 --- a/oqs/Cargo.toml +++ b/oqs/Cargo.toml @@ -35,7 +35,8 @@ kyber = ["oqs-sys/kyber"] ntruprime = ["oqs-sys/ntruprime"] ml_kem = ["oqs-sys/ml_kem"] # algorithms: Signature schemes -sigs = ["oqs-sys/sigs", "dilithium", "falcon", "sphincs"] +sigs = ["oqs-sys/sigs", "dilithium", "falcon", "sphincs", "ml_dsa"] dilithium = ["oqs-sys/dilithium"] falcon = ["oqs-sys/falcon"] sphincs = ["oqs-sys/sphincs"] +ml_dsa = ["oqs-sys/ml_dsa"] \ No newline at end of file diff --git a/oqs/src/sig.rs b/oqs/src/sig.rs index c4a87519be..f496d01f25 100644 --- a/oqs/src/sig.rs +++ b/oqs/src/sig.rs @@ -131,6 +131,12 @@ implement_sigs! { ("sphincs") SphincsShake192sSimple: OQS_SIG_alg_sphincs_shake_192s_simple, ("sphincs") SphincsShake256fSimple: OQS_SIG_alg_sphincs_shake_256f_simple, ("sphincs") SphincsShake256sSimple: OQS_SIG_alg_sphincs_shake_256s_simple, + ("ml_dsa") MlDsa44Ipd: OQS_SIG_alg_ml_dsa_44_ipd, + ("ml_dsa") MlDsa65Ipd: OQS_SIG_alg_ml_dsa_65_ipd, + ("ml_dsa") MlDsa87Ipd: OQS_SIG_alg_ml_dsa_87_ipd, + ("ml_dsa") MlDsa44: OQS_SIG_alg_ml_dsa_44, + ("ml_dsa") MlDsa65: OQS_SIG_alg_ml_dsa_65, + ("ml_dsa") MlDsa87: OQS_SIG_alg_ml_dsa_87, } impl Algorithm { From 20a0db1d4f7cb889a629d91d6469a8c89d9702a3 Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:25:17 +0200 Subject: [PATCH 4/7] fix(oqs): corrected kem names for ML-KEM Signed-off-by: Ferdinand Linnenberg --- oqs/src/kem.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/oqs/src/kem.rs b/oqs/src/kem.rs index 43d694d65c..b43d3e3c9e 100644 --- a/oqs/src/kem.rs +++ b/oqs/src/kem.rs @@ -140,12 +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, + ("ml_kem") MlKem512Ipd: OQS_KEM_alg_ml_kem_512_ipd, + ("ml_kem") MlKem768Ipd: OQS_KEM_alg_ml_kem_768_ipd, + ("ml_kem") MlKem1024Ipd: OQS_KEM_alg_ml_kem_1024_ipd, + ("ml_kem") MlKem512: OQS_KEM_alg_ml_kem_512, + ("ml_kem") MlKem768: OQS_KEM_alg_ml_kem_768, + ("ml_kem") MlKem1024: OQS_KEM_alg_ml_kem_1024, } impl Algorithm { From ec5b06edf6696a9f298b5d45ad58d50d6cb9106f Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:26:49 +0200 Subject: [PATCH 5/7] chore(oqs): bumped version to 0.10.0, and oqs-sys dependency version to 0.10.0+liboqs-0.10.0 Signed-off-by: Ferdinand Linnenberg --- oqs/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oqs/Cargo.toml b/oqs/Cargo.toml index c5baaa3fc4..4552053770 100644 --- a/oqs/Cargo.toml +++ b/oqs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oqs" -version = "0.9.0" +version = "0.10.0" authors = ["Thom Wiggers "] edition = "2021" description = "A Rusty interface to Open-Quantum-Safe's liboqs" @@ -16,7 +16,7 @@ serde = { version = "1.0", optional = true, default-features = false, features = [dependencies.oqs-sys] path = "../oqs-sys" -version = "0.9.0" +version = "0.10.0+liboqs-0.10.0" default-features = false [features] From adc4c13551b1e0898d9f16c9fe87a4eed4891050 Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:37:33 +0200 Subject: [PATCH 6/7] docs(README.md): Added new KEM, SIGS to README.md Signed-off-by: Ferdinand Linnenberg --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 223ab2ae3b..2ef7db277c 100644 --- a/README.md +++ b/README.md @@ -103,12 +103,14 @@ tests. - `kyber` - `ntruprime` - `saber` + - `ml_kem` - `sigs` (default): Compile with all signature schemes enabled - `dilithium` - `falcon` - `picnic` - `rainbow` - `sphincs`: SPHINCS+ + - `ml_dsa` ## Running From 0c93e56a3a29bf191324636a9f5bbc0bd6e98873 Mon Sep 17 00:00:00 2001 From: Ferdinand Linnenberg Date: Wed, 10 Apr 2024 21:39:38 +0200 Subject: [PATCH 7/7] docs(README.md): updated oqs version in usage section Signed-off-by: Ferdinand Linnenberg --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ef7db277c..ccd8e8111f 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Update your `Cargo.toml` and include `oqs`: ```toml [dependencies] -oqs = "0.9.0" +oqs = "0.10.0" ``` `oqs-sys` can be specified equivalently.