From 495b23a5b7856828325d630d13e60ee2406be777 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 7 Nov 2024 22:01:51 +0800 Subject: [PATCH] mlkem-c-aarch64 -> mlkem-native Signed-off-by: Matthias J. Kannwischer --- .github/actions/bench/action.yml | 2 +- README.md | 26 +++++++++---------- cbmc/proofs/Makefile-template-defines | 2 +- cbmc/proofs/README.md | 2 +- .../x86_64/xkcp/KeccakP-1600-times4-SIMD256.c | 2 +- flake.nix | 2 +- 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/actions/bench/action.yml b/.github/actions/bench/action.yml index 0d9104939..f480d177e 100644 --- a/.github/actions/bench/action.yml +++ b/.github/actions/bench/action.yml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -name: Bench MLKEM-C-AArch64 +name: Bench mlkem-native description: Run benchmarking script inputs: diff --git a/README.md b/README.md index efb085ac4..642d2e891 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [//]: # (SPDX-License-Identifier: CC-BY-4.0) -# mlkem-c-aarch64 +# mlkem-native -**mlkem-c-aarch64** is a C99 implementation of [ML-KEM](https://doi.org/10.6028/NIST.FIPS.203.ipd) targeting +**mlkem-native** is a C99 implementation of [ML-KEM](https://doi.org/10.6028/NIST.FIPS.203.ipd) targeting PC, mobile and server platforms. It is a fork of the ML-KEM [reference implementation](https://github.com/pq-crystals/kyber/tree/main/ref) and remains very close to it, adding a simple interface for native code (e.g. assembler) as well as implementations of that interface in C, AArch64, and x86_64. @@ -10,27 +10,25 @@ interface for native code (e.g. assembler) as well as implementations of that in If you need an ML-KEM implementation suitable for embedded systems, see [**mlkem-c-embedded**](https://github.com/pq-code-package/mlkem-c-embedded/). -**Note on naming:** **mlkem-c-aarch64** is a misnomer reflecting the original focus on AArch64. The project is likely to be renamed to -reflect its broadened scope. ### Goals -**mlkem-c-aarch64** aims for _assurance_, _ease of use_, and _performance_. We only include implementations into -**mlkem-c-aarch64** which are manually auditable or for which we see a path towards formal verification. All assembly aims +**mlkem-native** aims for _assurance_, _ease of use_, and _performance_. We only include implementations into +**mlkem-native** which are manually auditable or for which we see a path towards formal verification. All assembly aims to be readable and micro-optimization deferred to automated tooling such as -[SLOTHY](https://slothy-optimizer.github.io/slothy/). Ultimately, **mlkem-c-aarch64** strives for constant-time +[SLOTHY](https://slothy-optimizer.github.io/slothy/). Ultimately, **mlkem-native** strives for constant-time implementations for which the C-code is verified to be free of undefined behaviour, and where all assembly is functionally verified. ### Current state -**mlkem-c-aarch64** is work in progress. **WE DO NOT CURRENTLY RECOMMEND RELYING ON THIS LIBRARY IN A PRODUCTION +**mlkem-native** is work in progress. **WE DO NOT CURRENTLY RECOMMEND RELYING ON THIS LIBRARY IN A PRODUCTION ENVIRONMENT OR TO PROTECT ANY SENSITIVE DATA.** Once we have the first stable version, this notice will be removed. #### Performance -**mlkem-c-aarch64** has complete AArch64 and AVX2 backends of competitive performance (see -[benchmarks](https://pq-code-package.github.io/mlkem-c-aarch64/dev/bench/)). +**mlkem-native** has complete AArch64 and AVX2 backends of competitive performance (see +[benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/)). #### Verification @@ -51,7 +49,7 @@ nix develop --experimental-features 'nix-command flakes' ### Native setup -To build **mlkem-c-aarch64**, you need `make` and a C99 compiler. To use the test scripts, you need Python3 with +To build **mlkem-native**, you need `make` and a C99 compiler. To use the test scripts, you need Python3 with dependencies as specified in [requirements.txt](requirements.txt). We recommend using a virtual environment, e.g.: ```bash @@ -88,10 +86,10 @@ will compile and run functionality tests. For detailed information on how to use ### Call for contributors -We are actively seeking contributors who can help us build **mlkem-c-aarch64**. If you are interested, please contact us, +We are actively seeking contributors who can help us build **mlkem-native**. If you are interested, please contact us, or volunteer for any of the open issues. ### Call for potential consumers -If you are a potential consumer of **mlkem-c-aarch64**, please reach out: We're interested in hearing the way you want to -use **mlkem-c-aarch64**. If you have specific feature requests, please open an issue. +If you are a potential consumer of **mlkem-native**, please reach out: We're interested in hearing the way you want to +use **mlkem-native**. If you have specific feature requests, please open an issue. diff --git a/cbmc/proofs/Makefile-template-defines b/cbmc/proofs/Makefile-template-defines index 96758532b..523db9961 100644 --- a/cbmc/proofs/Makefile-template-defines +++ b/cbmc/proofs/Makefile-template-defines @@ -17,4 +17,4 @@ LITANI ?= litani # # make PROJECT_NAME="FreeRTOS MQTT" report # -PROJECT_NAME = "mlkem-c-aarch64" +PROJECT_NAME = "mlkem-native" diff --git a/cbmc/proofs/README.md b/cbmc/proofs/README.md index f58ff8e31..d85f79a99 100644 --- a/cbmc/proofs/README.md +++ b/cbmc/proofs/README.md @@ -6,7 +6,7 @@ CBMC proofs # Overview This directory contains [CBMC](https://github.com/diffblue/cbmc) proofs for the absence -of certain classes of undefined behaviour for parts of the C-code in MLKEM-C-AArch64. +of certain classes of undefined behaviour for parts of the C-code in mlkem-native. Proofs are organized by functions, with the harnesses and proofs for each function in a separate directory. diff --git a/fips202/native/x86_64/xkcp/KeccakP-1600-times4-SIMD256.c b/fips202/native/x86_64/xkcp/KeccakP-1600-times4-SIMD256.c index 17a1eb1c0..76204fa6a 100644 --- a/fips202/native/x86_64/xkcp/KeccakP-1600-times4-SIMD256.c +++ b/fips202/native/x86_64/xkcp/KeccakP-1600-times4-SIMD256.c @@ -16,7 +16,7 @@ and related or neighboring rights to the source code in this file. */ /* - * Changes for MLKEM-C-AArch64: + * Changes for mlkem-native: * - copyFromState and copyToState operate on uninterleaved * Keccak states in memory. */ diff --git a/flake.nix b/flake.nix index 0c37581e2..a4b4b2ad9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 { - description = "mlkem-c-aarch64"; + description = "mlkem-native"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";