From 61d5e186bae6974c1456af7b43ed3757a838bdf8 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 21 Nov 2024 09:47:19 +0800 Subject: [PATCH] Update documentation in preparation of the alpha release Signed-off-by: Matthias J. Kannwischer Signed-off-by: Hanno Becker --- .github/ISSUE_TEMPLATE/bug_report.md | 39 +++--- .github/ISSUE_TEMPLATE/feature_request.md | 27 ++-- .github/pull_request_template.md | 23 +++- .github/settings.yml | 18 --- BUILDING.md | 66 +++++++++ CODEOWNERS | 2 +- CODE_OF_CONDUCT.md | 6 - CONTRIBUTING.md | 17 ++- GOVERNANCE.md | 6 - README.md | 156 ++++++++++------------ RELEASE.md | 28 ++++ SECURITY.md | 8 +- SUPPORT.md | 6 - docs/images/mlkem_native.png | Bin 0 -> 13534 bytes scripts/ci/lint | 4 +- scripts/format | 2 +- 16 files changed, 243 insertions(+), 165 deletions(-) delete mode 100644 .github/settings.yml create mode 100644 BUILDING.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 GOVERNANCE.md create mode 100644 RELEASE.md delete mode 100644 SUPPORT.md create mode 100644 docs/images/mlkem_native.png diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f3d5c415e..c6de62fd4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,33 @@ --- name: Bug report about: Create a report to help us improve -title: '' labels: bug -assignees: '' - --- + + + + **Describe the bug** A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error +**Platform**: e.g., x86_64 Linux -**Expected behavior** -A clear and concise description of what you expected to happen. +**Compiler**: e.g., gcc 13.2.0 (installed through nix) -**Screenshots** -If applicable, add screenshots to help explain your problem. +**How to reproduce** +Steps to reproduce the behavior: +``` -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] +``` -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] +**Expected behavior** +A clear and concise description of what you expected to happen. **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 11fc491ef..e0d799c23 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,31 @@ --- name: Feature request about: Suggest an idea for this project -title: '' labels: enhancement -assignees: '' - --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +**Platform**: +Which platform does this concern? +- [ ] platform independent +- [ ] aarch64 +- [ ] x86_64 +- [ ] rv64 +- [ ] other + +**Issue category**: + +Which part(s) of mlkem-native does this issue concern: + +- [ ] core crypto: ML-KEM +- [ ] core crypto: FIPS202 +- [ ] documentation +- [ ] integration +- [ ] CBMC +- [ ] CI +- [ ] Testing **Describe the solution you'd like** A clear and concise description of what you want to happen. -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - **Additional context** Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 92957f2a6..e26f6aaed 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,8 +1,21 @@ -[//]: # (SPDX-License-Identifier: CC-BY-4.0) - + +DO NOT submit pull requests related to security issues directly - instead use Github's [private vulnerability reporting](https://github.com/pq-code-package/mlkem-native/security). +--> - +**Summary**: +Provide a brief summary of your changes. - +**Steps**: +If your pull request consists of multiple sequential changes, please describe them here: + +**Performed local tests**: + - [ ] `lint` passing + - [ ] `tests all` passing + - [ ] `tests bench` passing + - [ ] `tests cbmc` passing + +**Do you expect this change to impact performance**: Yes/No + +If yes, please provide local benchmarking results. diff --git a/.github/settings.yml b/.github/settings.yml deleted file mode 100644 index f85205f81..000000000 --- a/.github/settings.yml +++ /dev/null @@ -1,18 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - -repository: - name: template-code - description: Template repo - homepage: https://github.com/pq-code-package/tsc - default_branch: main - has_downloads: false - has_issues: true - has_projects: true - has_wiki: false - archived: false - private: false - allow_squash_merge: true - allow_merge_commit: false - allow_rebase_merge: true diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 000000000..2ef94dc67 --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,66 @@ +[//]: # (SPDX-License-Identifier: CC-BY-4.0) + +# Building mlkem-native + +### Prerequisites + +To build **mlkem-native**, you need `make` and a C90 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 +python3 -m venv venv +./venv/bin/python3 -m pip install -r requirements.txt +source venv/bin/activate +``` + +### Using `make` + +You can build and test **mlkem-native** as follows: + +```bash +make quickcheck # With native code backend (if available) +make OPT=0 quickcheck # With C backend +``` + +To merely build test and benchmarking components, use the following `make` targets: + +```bash +make mlkem +make bench +make bench_components +make nistkat +make kat +``` + +The resulting binaries can then be found in [test/build](test/build). + +### Using `tests` script + +We recommend compiling and running tests and benchmarks using the [`./scripts/tests`](scripts/tests) script. For +example, + +```bash +./scripts/tests func +``` + +will compile and run functionality tests. For detailed information on how to use the script, please refer to the +`--help` option. + +### Nix setup + +All the development and build dependencies are also specified in [flake.nix](flake.nix). We recommend installing them +using +[nix](https://nixos.org/download/). To execute a bash shell with the development environment specified in +[flake.nix](flake.nix), run +```bash +nix develop --experimental-features 'nix-command flakes' +``` + +### Windows + +You can also build **mlkem-native** on Windows using `nmake` and an MSVC compiler. + +To build and run the tests (only support functional testing for non-opt implementation for now), use the following `nmake` targets: +```powershell +nmke /f .\Makefile.Microsoft_nmake quickcheck +``` diff --git a/CODEOWNERS b/CODEOWNERS index eb74fcb9a..0268df278 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,4 @@ # SPDX-License-Identifier: Apache-2.0 # Last matching pattern has precedence -* @pq-code-package/pqcp-embedded-maintainers-aarch64 +* @pq-code-package/pqcp-native-maintainers diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 9af549938..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,6 +0,0 @@ -[//]: # (SPDX-License-Identifier: CC-BY-4.0) -[//]: # (TODO Add code of conduct) - -# Code of Conduct - -Please see [open issue](https://github.com/pq-code-package/tsc/issues/9) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1240c5d16..c1a96d6d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,19 @@ [//]: # (SPDX-License-Identifier: CC-BY-4.0) -[//]: # (TODO Add contributing guide) # Contributing -to be completed +We welcome proposals to improve **mlkem-native**. +In particular, we are interested to hear how you plan to use **mlkem-native** or what should be improved about **mlkem-native** allowing other projects to rely on it. +If you have specific feature requests, please open an issue. + +You can contact the **mlkem-native** team through the [PQCA Discord](https://discord.com/invite/xyVnwzfg5R). + +## Call for contributors + +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-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/GOVERNANCE.md b/GOVERNANCE.md deleted file mode 100644 index 9c9dcb3a8..000000000 --- a/GOVERNANCE.md +++ /dev/null @@ -1,6 +0,0 @@ -[//]: # (SPDX-License-Identifier: CC-BY-4.0) -[//]: # (TODO Define governance) - -# Governance - -to be documented diff --git a/README.md b/README.md index c69f7f51c..ac6ab997d 100644 --- a/README.md +++ b/README.md @@ -1,115 +1,101 @@ [//]: # (SPDX-License-Identifier: CC-BY-4.0) -# mlkem-native - -**mlkem-native** is a C90 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), deviating primarily to (a) accommodate an -interface for native code (e.g. assembler), and (b) facilitate formal verification. **mlkem-native** provides -native code backends in C, AArch64 and x86_64, offering state of the art performance on most Arm, Intel and AMD -platforms. - -If you need an ML-KEM implementation suitable for embedded systems, see -[**mlkem-c-embedded**](https://github.com/pq-code-package/mlkem-c-embedded/). - -### Goals - -**mlkem-native** aims for _assurance_, _ease of use_, and _performance_. We seek implementations -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-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. - -### Intended use +![mlkem_native_logo](docs/images/mlkem_native.png) -**mlkem-native** is currently intended to be used as a code package, where source files of **mlkem-native** -are imported into a consuming project's source tree and built using that project's build system. The build system -provided in this repository is for experimental and development purposes only. - -### Current state - -**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. +# mlkem-native -#### Performance +![CI](https://github.com/pq-code-package/mlkem-native/actions/workflows/ci.yml/badge.svg) +![Benchmarks](https://github.com/pq-code-package/mlkem-native/actions/workflows/bench.yml/badge.svg) +[![C90](https://img.shields.io/badge/language-C90-blue.svg)](https://web.archive.org/web/20200909074736if_/https://www.pdf-archive.com/2014/10/02/ansi-iso-9899-1990-1/ansi-iso-9899-1990-1.pdf) +[![Apache](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://www.apache.org/licenses/LICENSE-2.0) -**mlkem-native** has complete AArch64 and AVX2 backends of competitive performance (see -[benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/)). +mlkem-native is a C90 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). -#### Verification +mlkem-native aims to be secure, fast, and easy to use: It provides native code backends in C, AArch64 and +x86_64, offering state of the art performance on most Arm, Intel and AMD platforms (see +[benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/)). The C code in [mlkem/*](mlkem) is verified +using [CBMC](https://github.com/diffblue/cbmc) to be free of undefined behaviour. In particular, there are no out of +bounds accesses, nor integer overflows during optimized modular arithmetic. -All C code in [mlkem/*](mlkem) is verified to be memory and type safe using CBMC. This excludes, for example, out of -bounds accesses, as well as integer overflows during optimized modular arithmetic. See the [CBMC -Readme](cbmc/proofs/README.md) and the [CBMC Proof Guide](cbmc/proofs/proof_guide.md) for more information and how to -reproduce the proofs. The code in [fips202/*](fips202) has not yet been verified using CBMC. +## Quickstart for Ubuntu -Initial experiments are underway to verify AArch64 using [HOL-Light](https://hol-light.github.io/). +```bash +# Clone mlkem-native +git clone https://github.com/pq-code-package/mlkem-native.git +cd mlkem-native -### Getting started +# Install base packages +sudo apt-get update +sudo apt-get install python3-venv python3-pip make -### Nix setup +# Setup Python environment +python3 -m venv venv +source venv/bin/activate +python3 -m pip install -r requirements.txt -All the development and build dependencies are specified in [flake.nix](flake.nix). We recommend installing them using -[nix](https://nixos.org/download/). +# Build and run base tests +make quickcheck -To execute a bash shell with the development environment specified in [flake.nix](flake.nix), run -```bash -nix develop --experimental-features 'nix-command flakes' +# Build and run all tests +./scripts/tests all ``` -### Native setup - -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.: +See [BUILDING.md](BUILDING.md) for more information. -```bash -python3 -m venv venv -./venv/bin/python3 -m pip install -r requirements.txt -source venv/bin/activate -``` +## Security -### Using `make` +mlkem-native is being developed with security at the top of mind. All native code is constant-time in the sense that +it is free of secret-dependent control flow, memory access, and instructions that are commonly variable-time, +thwarting most timing side channels. +The C code is hardened against compiler-introduced timing side channels (such as +[KyberSlash](https://kyberslash.cr.yp.to/) or [clangover](https://github.com/antoonpurnal/clangover)) +through suitable barriers and constant-time patterns. -You can build tests and benchmarks using the following `make` targets: +## Formal Verification -```bash -make mlkem -make bench -make bench_components -make nistkat -make kat -``` +We use the [C Bounded Model Checker (CBMC)](https://github.com/diffblue/cbmc) to prove absence of various classes of +undefined behaviour in C, including out of bounds memory accesses and integer overflows. At present, the proofs cover +all C code in [mlkem/*](mlkem) involved in running mlkem-native with its C backend. See [cbmc/proofs](cbmc/proofs) for +details. -The resulting binaries can be found in [test/build](test/build). +Initial experiments are underway to verify assembly using the [HOL-Light](https://hol-light.github.io/) theorem prover +and the [s2n-bignum](https://github.com/awslabs/s2n-bignum) infrastructure. -### Windows +## State -You can also build **mlkem-native** on Windows using `nmake` and an MSVC compiler. +mlkem-native is in alpha-release stage. We believe it is ready for use, and hope to spark experiments on +integration into other software before issuing a stable release. If you have any feedback, please reach out! See +[RELEASE.md](RELEASE.md) for details. -To build and run the tests (only support functional testing for non-opt implementation for now), use the following `nmake` targets: -```powershell -nmke /f .\Makefile.Microsoft_nmake quickcheck -``` +mlkem-native is intended to be used as a code package, where source files are imported into a consuming project's +source tree and built using that project's build system. The build system provided in this repository is for +experimental and development purposes only. If you prefer a library-build, please get in touch or open an issue. -### Using `tests` script +## Design -We recommend compiling and running tests and benchmarks using the [`./scripts/tests`](scripts/tests) script. For -example, +mlkem-native is split in a _frontend_ and two _backends_ for arithmetic and FIPS-202 (SHA3). The frontend is +fixed, written in C and covers all routines that are not critical to performance. The backends are flexible, take care of +performance-sensitive routines, and can be implemented in C or native code (assembly/intrinsics); see +[mlkem/native/arith_native.h](mlkem/native/arith_native.h) for the arithmetic backend and +[fips202/native/fips202_native.h](fips202/native/fips202_native.h) for the FIPS-202 backend. mlkem-native currently +offers three backends for C, AArch64 and x86_64 - if you'd like contribute new backends, please reach out or just open a +PR. -```bash -./scripts/tests func -``` +Our AArch64 assembly is developed using [SLOTHY](https://github.com/slothy-optimizer/slothy): We write +'clean' assembly by hand and automate micro-optimizations (e.g. see the [clean](mlkem/native/aarch64/ntt_clean.S) +vs [optimized](mlkem/native/aarch64/ntt_opt.S) AArch64 NTT). -will compile and run functionality tests. For detailed information on how to use the script, please refer to the -`--help` option. +## Have a Question? -### Call for contributors +If you think you have found a security bug in mlkem-native, please report the vulnerability through +Github's [private vulnerability reporting](https://github.com/pq-code-package/mlkem-native/security). Please do **not** +create a public GitHub issue. -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. +If you have any other question / non-security related issue / feature request, please open a GitHub issue. -### Call for potential consumers +## Contributing -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. +If you want to help us build mlkem-native, please reach out. You can contact the mlkem-native team +through the [PQCA Discord](https://discord.com/invite/xyVnwzfg5R). diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..829ce7dc1 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,28 @@ +[//]: # (SPDX-License-Identifier: CC-BY-4.0) +mlkem-native alpha +================== + +About +----- + +mlkem-native is a C90 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). + +mlkem-native aims to be fast, secure, and easy to use: It provides native code backends in C, AArch64 and +x86_64, offering state-of-the-art performance on most Arm, Intel and AMD platforms. The C code in [mlkem/*](mlkem) is +verified using [CBMC](https://github.com/diffblue/cbmc) to be free of undefined behavior. In particular, there are no +out of bounds accesses, nor integer overflows during optimized modular arithmetic. + +Release notes +============= + +This is first official release of mlkem-native, a C90 implementation of [ML-KEM](https://doi.org/10.6028/NIST.FIPS.203.ipd) targeting +PC, mobile and server platforms. +This alpha release of mlkem-native features complete backends in C, AArch64 and x86_64, offering state-of-the-art performance on most Arm, Intel and AMD platforms. + +With this alpha release we intend to spark experiments on integrations of mlkem-native in other software. +We appreciate any feedback on how to improve and extend mlkem-native in the future. +Please open an issue on https://github.com/pq-code-package/mlkem-native. +While we continue on improving and extending mlkem-native, we expect that the majority of the code is stable. +In particular, the core external APIs are stable; we will potentially expose additional functions (e.g., operating on expanded secret keys) in the future. diff --git a/SECURITY.md b/SECURITY.md index 26b29e2ec..6b80d9962 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,8 @@ [//]: # (SPDX-License-Identifier: CC-BY-4.0) -[//]: # (TODO Add Security Policy) -# Security +# Security Policy -Please see [open issue](https://github.com/pq-code-package/tsc/issues/8) +## Reporting security bugs + +If you think you have found a security bug in mlkem-native, please report the vulnerability through +Github's [private vulnerability reporting](https://github.com/pq-code-package/mlkem-native/security). diff --git a/SUPPORT.md b/SUPPORT.md deleted file mode 100644 index ead4aa114..000000000 --- a/SUPPORT.md +++ /dev/null @@ -1,6 +0,0 @@ -[//]: # (SPDX-License-Identifier: CC-BY-4.0) -[//]: # (TODO add support information) - -# Support - -To be written. diff --git a/docs/images/mlkem_native.png b/docs/images/mlkem_native.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5faa4e62bb9259efd8cb2e528a95e8c9f14fb0 GIT binary patch literal 13534 zcmb`uWpErp(k3h>i!E8qEK4I8F{8z7FctPxnu%xp2U#mvmi3>LFa-ra9^zc=n8 z?#E3eGup^v5-^fw-a!7??XH7?^JW7}(PX%l8lr%!v^U>{t&Bj4K%o49hmXMSQQY-4Xk%m!ctFp}~i5EB#g*c%#iDT;ji7yRRjm(oyriUm9sT?B&v81M8UM$VwZp%{`UsHWuY`dKz{v2wgBiJ+{U2a|CI5u|Bd&kC zHm$7OWw@Y$Wl$j%*x2x;cql7f1~-|O8zHO*v8Vv zUddM9z=-d|(LW&n#rmJx|L~*!A3w~T?EmfOza;-c@-Y0(_kZR8pT+eL?nia;A@DH# zyHfcOOkkAf!N3?#B}4?jyMmv2!MbYo&E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63,7 +63,7 @@ echo "::endgroup::" check-eol-dry-run() { - for file in $(git ls-files -- ":/"); do + for file in $(git ls-files -- ":/" ":/!:*.png"); do if [[ $(tail -c1 "$file" | wc -l) == 0 ]]; then l=$(wc -l <"$file") echo "$file $l" @@ -77,7 +77,7 @@ echo "::endgroup::" check-spdx() { local success=true - for file in $(git ls-files -- ":/" ":/!:*.json" ":/!:*LICENSE*" ":/!:.git*" ":/!:flake.lock"); do + for file in $(git ls-files -- ":/" ":/!:*.json" ":/!:*.png" ":/!:*LICENSE*" ":/!:.git*" ":/!:flake.lock"); do if [[ $(grep "SPDX-License-Identifier:" $file | wc -l) == 0 ]]; then echo "::error file=$file,line=${line:-1},title=Missing license header error::$file is missing SPDX License header" success=false diff --git a/scripts/format b/scripts/format index 5a0757679..267811204 100755 --- a/scripts/format +++ b/scripts/format @@ -34,7 +34,7 @@ clang-format -i $(git ls-files ":/*.c" ":/*.h") info "Checking for eol" check-eol() { - for file in $(git ls-files -- ":/"); do + for file in $(git ls-files -- ":/" ":/!:*.png"); do if [[ $(tail -c1 "$file" | wc -l) == 0 ]]; then echo "" >>"$file" echo "$file"