From 53068ae615672443d3c7fff4ecc167c5e649f214 Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Tue, 2 Jul 2024 11:03:33 +0200 Subject: [PATCH 1/3] Use optimized version of KEMs --- libcrux-psq/Cargo.toml | 2 +- libcrux-psq/README.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libcrux-psq/Cargo.toml b/libcrux-psq/Cargo.toml index e85de5287..8a555329a 100644 --- a/libcrux-psq/Cargo.toml +++ b/libcrux-psq/Cargo.toml @@ -12,7 +12,7 @@ readme.workspace = true path = "src/psq.rs" [dependencies] -libcrux-kem = { version = "0.0.2-pre.2", path = "../libcrux-kem" } +libcrux-kem = { version = "0.0.2-pre.2", path = "../libcrux-kem", features = ["pre-verification"] } libcrux-hkdf = { version = "=0.0.2-pre.2", path = "../libcrux-hkdf" } libcrux-hmac = { version = "=0.0.2-pre.2", path = "../libcrux-hmac" } classic-mceliece-rust = { version = "2.0.0", features = [ diff --git a/libcrux-psq/README.md b/libcrux-psq/README.md index c98576bbe..2f89127ea 100644 --- a/libcrux-psq/README.md +++ b/libcrux-psq/README.md @@ -30,3 +30,7 @@ KEMs: candidate in the NIST PQ competition, * `XWingKemDraft02`, a hybrid post-quantum KEM, combining `X25519` and `ML-KEM 768` based KEMs + +For x25519 and ML-KEM, we use `libcrux`'s optimized implementations, +the Classic McEliece-based protocol uses crate +[`classic-mceliece-rust`](https://crates.io/crates/classic-mceliece-rust). From 3a51fe5c3dca5245666c87d0921e6ebeddc22b9a Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Tue, 2 Jul 2024 16:43:04 +0200 Subject: [PATCH 2/3] Instruction on how to run benchmarks --- libcrux-psq/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libcrux-psq/README.md b/libcrux-psq/README.md index 2f89127ea..8a67b4ee6 100644 --- a/libcrux-psq/README.md +++ b/libcrux-psq/README.md @@ -34,3 +34,14 @@ KEMs: For x25519 and ML-KEM, we use `libcrux`'s optimized implementations, the Classic McEliece-based protocol uses crate [`classic-mceliece-rust`](https://crates.io/crates/classic-mceliece-rust). + +# Running benchmarks +To run a set of benchmarks comparing the underlying KEMs run +```sh +cargo bench +``` + +To get a comparison of public key and message sizes in bytes run +```sh +cargo run --example sizes +``` From 1d9fdf584a0cbe0ecd4b6eb24abc66228c49ebd7 Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Tue, 2 Jul 2024 16:45:06 +0200 Subject: [PATCH 3/3] Readme Formatting --- libcrux-psq/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libcrux-psq/README.md b/libcrux-psq/README.md index 8a67b4ee6..7656963b7 100644 --- a/libcrux-psq/README.md +++ b/libcrux-psq/README.md @@ -22,14 +22,14 @@ Where The crate implements the protocol based on several different internal KEMs: - * `X25519`, an elliptic-curve Diffie-Hellman KEM (not post-quantum - secure; for performance comparison) - * `ML-KEM 768`, a lattice-based post-quantum KEM, in the process - of being standardized by NIST - * `Classic McEliece`, a code-based post-quantum KEM & Round 4 - candidate in the NIST PQ competition, - * `XWingKemDraft02`, a hybrid post-quantum KEM, combining `X25519` - and `ML-KEM 768` based KEMs +* `X25519`, an elliptic-curve Diffie-Hellman KEM (not post-quantum + secure; for performance comparison) +* `ML-KEM 768`, a lattice-based post-quantum KEM, in the process + of being standardized by NIST +* `Classic McEliece`, a code-based post-quantum KEM & Round 4 + candidate in the NIST PQ competition, +* `XWingKemDraft02`, a hybrid post-quantum KEM, combining `X25519` + and `ML-KEM 768` based KEMs For x25519 and ML-KEM, we use `libcrux`'s optimized implementations, the Classic McEliece-based protocol uses crate