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

Integrate Kyber from libjade #1745

Merged
merged 84 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
de97c41
Add copy_from_libjade.yml
praveksharma Apr 2, 2024
ddcfdb3
Modify copy_from_upstream.py
praveksharma Apr 2, 2024
a18fa2a
Add patches for libjade Kyber code
praveksharma Apr 2, 2024
e81c66e
Update alg_support.cmake templates
praveksharma Apr 2, 2024
75b33ba
Update KEM famiy templates
praveksharma Apr 2, 2024
7137e8c
Fix copy_from_upstream.py
praveksharma Apr 2, 2024
532cadf
Correct copy_from_upstream.py
praveksharma Apr 2, 2024
4912808
Modify copy_from_upstream.yml
praveksharma Apr 2, 2024
8b8a7ef
Update KEM family templates
praveksharma Apr 2, 2024
cca5cd4
Fix copy_from_upstream.py
praveksharma Apr 2, 2024
0b4af0b
Fix KEM family templates
praveksharma Apr 2, 2024
e1238f9
Fix KEM family templates
praveksharma Apr 2, 2024
4d6aa1f
Update templates for build system files
praveksharma Apr 2, 2024
41b4af6
Update build system files
praveksharma Apr 2, 2024
0cd7af0
Fix add_enable_by_alg_conditional.libjade
praveksharma Apr 2, 2024
d62113d
Run copy_from_upstream.py
praveksharma Apr 2, 2024
32b2f99
Update KEM family templates
praveksharma Apr 3, 2024
71577e1
Update KEM templates
praveksharma Apr 3, 2024
87d39de
Update KEM templates
praveksharma Apr 3, 2024
0bd3be8
Update copy_from_upstream.yml with libjade implementation info
praveksharma Apr 3, 2024
a1450bf
Update KEM templates
praveksharma Apr 3, 2024
1bc0ff7
Edit KEM templates
praveksharma Apr 3, 2024
06b1036
Run copy_from_upstream.py
praveksharma Apr 3, 2024
36a1dcf
Update copy_from_upstream.py
praveksharma Apr 3, 2024
70fd60f
Fix KEM temlates
praveksharma Apr 3, 2024
421886a
Run copy_from_upstream.py
praveksharma Apr 3, 2024
d5bc956
Add libjade_shim
praveksharma Apr 3, 2024
79ccabf
Add jasmin/libjade namespaces to test_binary.py
praveksharma Apr 3, 2024
6f5a968
Update testing
praveksharma Apr 3, 2024
1b6034f
Allow manually triggering CI tests
praveksharma Apr 3, 2024
f418438
Change container for upstreamcheck in unix.yml
praveksharma Apr 3, 2024
109092e
Update copy_from_upstream.py
praveksharma Apr 3, 2024
f8ca495
Edit unix.yml
praveksharma Apr 3, 2024
578eab7
Edit unix.yml
praveksharma Apr 3, 2024
176c5cb
Restrict copying of code from libjade repo to relevant files
praveksharma Apr 4, 2024
f2c6c04
Remove irrelevant libjade code
praveksharma Apr 4, 2024
123d4c8
Remove redundant KEM templates
praveksharma Apr 4, 2024
4e92667
Update KEM template to accomodate new dir structure
praveksharma Apr 4, 2024
d0e72a9
Debug: tweak unix.yml
praveksharma Apr 4, 2024
7f5ec38
Re-build libjade with jasmin version used in CI
praveksharma Apr 4, 2024
d26f552
Debug: undo unix.yml tweak
praveksharma Apr 4, 2024
88d1997
Allow MSVC to ignore libjade_shims
praveksharma Apr 4, 2024
c79a15a
Simplify name scheme for libjade code
praveksharma Apr 8, 2024
762ba8d
Update alg docs, libjade code name scheme, and license
praveksharma Apr 9, 2024
0f1d3bd
Update copy_from_upstream documentation
praveksharma Apr 9, 2024
92df906
Fix copy_from_upstream.py and simply libjade code name scheme
praveksharma Apr 9, 2024
ff78985
Update alg docs and CBOM
praveksharma Apr 9, 2024
e741027
Correct alg doc generation
praveksharma Apr 9, 2024
32de1d2
Generate CBOM with unique bom-ref
praveksharma Apr 9, 2024
4213a66
Cleanup unix.yml
praveksharma Apr 10, 2024
2819622
fix patches to include api.c; fix kem templates
praveksharma Apr 19, 2024
7f46047
fix kyber patch
praveksharma Apr 19, 2024
ba7bedf
turn off weekly constant time tests for libjade implementations
praveksharma Apr 19, 2024
a53ce69
update documentation
praveksharma Apr 19, 2024
35e34b0
change upstream to stable libjade release
praveksharma Apr 19, 2024
30b3259
fix kyber documentation
praveksharma Apr 22, 2024
e962361
fix kyber documentation
praveksharma Apr 22, 2024
6eae7d0
fix kem template again
praveksharma Apr 22, 2024
eec545b
fix weekly.yml and unix.yml to test libjade code
praveksharma Apr 22, 2024
e1b0edf
rename libjade asm files from *.s to *.S
praveksharma Apr 22, 2024
17ed11e
end libjade_kyber*/api.c files with newline
praveksharma Apr 23, 2024
6368bcc
fix kem template to prevent duplicate symbols in object files
praveksharma Apr 24, 2024
2255ed7
fix indentation in weekly.yml
praveksharma Apr 24, 2024
3783c4f
skip testing libjade on macos-14 in CI
praveksharma Apr 24, 2024
5c40696
use release tag/branch with libjade upstream url instead of commit
praveksharma Apr 24, 2024
05b069e
fix build error when OQS_ENABLE_LIBJADE_KEM_ALG=OFF
praveksharma Apr 25, 2024
54598ad
initialize LIBJADE_RANDOMBYTES when OQS_LIBJADE_BUILD=OFF
praveksharma Apr 25, 2024
5b11e20
remove redundant comment
praveksharma Apr 25, 2024
f5f64f3
fix comment typo
praveksharma Apr 25, 2024
b8cd0be
make string explicit when comparing with variable in cmake
praveksharma Apr 25, 2024
efb20eb
add libjade kyber licensing to README.md
praveksharma Apr 25, 2024
2107194
remove reference to oldpqclean_kyber* code from libjade if branchin k…
praveksharma Apr 25, 2024
ad8d626
Update CMakeLists.txt
praveksharma Apr 26, 2024
7d92d32
track jasminc version in copy_from_libjade.yml; check jasminc version…
praveksharma May 16, 2024
d27901f
add OQS_LIBJADE_BUILD to build flags output
praveksharma May 16, 2024
3796695
remove link from CONFIGURE.md
praveksharma May 24, 2024
597c78a
Update libjade to dual license
praveksharma Jul 16, 2024
14dcca7
Patch gcc version for MacOS CI runs
praveksharma Jul 16, 2024
b10de91
Merge branch 'main' into ps-jasmin
praveksharma Jul 16, 2024
1b17ad9
Fix doc generation
praveksharma Jul 16, 2024
bb888d2
Fix libjade docs
praveksharma Jul 17, 2024
6eeeb53
fix license info in README.md
praveksharma Aug 11, 2024
3721500
Merge branch 'main' into ps-jasmin
praveksharma Aug 11, 2024
b1c4950
update libjade_randombytes spdx-license
praveksharma Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .CMake/alg_support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ cmake_dependent_option(OQS_ENABLE_SIG_mayo_3 "" ON "OQS_ENABLE_SIG_MAYO" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_mayo_5 "" ON "OQS_ENABLE_SIG_MAYO" OFF)
##### OQS_COPY_FROM_UPSTREAM_FRAGMENT_ADD_ENABLE_BY_ALG_END

##### OQS_COPY_FROM_LIBJADE_FRAGMENT_ADD_ENABLE_BY_ALG_START
if ((OQS_LIBJADE_BUILD STREQUAL "ON"))

option(OQS_ENABLE_LIBJADE_KEM_KYBER "Enable libjade implementation of kyber algorithm family" ON)
cmake_dependent_option(OQS_ENABLE_LIBJADE_KEM_kyber_512 "" ON "OQS_ENABLE_LIBJADE_KEM_KYBER" OFF)
cmake_dependent_option(OQS_ENABLE_LIBJADE_KEM_kyber_768 "" ON "OQS_ENABLE_LIBJADE_KEM_KYBER" OFF)
endif()
##### OQS_COPY_FROM_LIBJADE_FRAGMENT_ADD_ENABLE_BY_ALG_END

if((OQS_MINIMAL_BUILD STREQUAL "ON"))
message(FATAL_ERROR "OQS_MINIMAL_BUILD option ${OQS_MINIMAL_BUILD} no longer supported")
endif()
Expand Down Expand Up @@ -530,6 +539,24 @@ endif()

##### OQS_COPY_FROM_UPSTREAM_FRAGMENT_ADD_ENABLE_BY_ALG_CONDITIONAL_END

##### OQS_COPY_FROM_LIBJADE_FRAGMENT_ADD_ENABLE_BY_ALG_CONDITIONAL_START
if ((OQS_LIBJADE_BUILD STREQUAL "ON"))

if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if(OQS_DIST_X86_64_BUILD OR (OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_BMI2_INSTRUCTIONS AND OQS_USE_POPCNT_INSTRUCTIONS))
cmake_dependent_option(OQS_ENABLE_LIBJADE_KEM_kyber_512_avx2 "" ON "OQS_ENABLE_LIBJADE_KEM_kyber_512" OFF)
endif()
endif()

if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if(OQS_DIST_X86_64_BUILD OR (OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_BMI2_INSTRUCTIONS AND OQS_USE_POPCNT_INSTRUCTIONS))
cmake_dependent_option(OQS_ENABLE_LIBJADE_KEM_kyber_768_avx2 "" ON "OQS_ENABLE_LIBJADE_KEM_kyber_768" OFF)
endif()
endif()

endif()
##### OQS_COPY_FROM_LIBJADE_FRAGMENT_ADD_ENABLE_BY_ALG_CONDITIONAL_END

option(OQS_ENABLE_SIG_STFL_XMSS "Enable XMSS algorithm family" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h10 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h16 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
Expand Down
43 changes: 38 additions & 5 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Linux and MacOS tests
permissions:
contents: read

on: [ push, pull_request ]
on: [ push, pull_request , workflow_dispatch]

env:
# Semi-colon separated list of algorithims with libjade implementations to
# be passed as input to CMake option as: -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
# See CONFIGURE.md under ## OQS_MINIMAL_BUILD
LIBJADE_ALG_LIST: "KEM_kyber_512;KEM_kyber_768"

jobs:

Expand All @@ -23,20 +29,32 @@ jobs:

upstreamcheck:
name: Check upstream code is properly integrated
strategy:
fail-fast: false
matrix:
copy-mode:
- copy
- libjade
container: openquantumsafe/ci-ubuntu-focal-x86_64:latest
runs-on: ubuntu-latest
steps:
- name: Setup nix
uses: cachix/install-nix-action@v26
- name: Setup jasmin-compiler
run: |
nix-channel --add https://nixos.org/channels/nixos-23.11 nixpkgs && \
nix-channel --update && nix-env -iA nixpkgs.jasmin-compiler
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Verify copy_from_upstream state
- name: Verify copy_from_upstream state after "${{ matrix.copy-mode}}"
run: |
git config --global user.name "ciuser" && \
git config --global user.email "[email protected]" && \
export LIBOQS_DIR=`pwd` && \
git config --global --add safe.directory $LIBOQS_DIR && \
cd scripts/copy_from_upstream && \
! pip3 install --require-hashes -r requirements.txt 2>&1 | grep ERROR && \
python3 copy_from_upstream.py copy && \
python3 copy_from_upstream.py ${{ matrix.copy-mode }} && \
! git status | grep modified

buildcheck:
Expand Down Expand Up @@ -155,13 +173,18 @@ jobs:
CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-9 -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DOQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN=OFF -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON
PYTEST_ARGS: --ignore=tests/test_distbuild.py --ignore=tests/test_leaks.py --ignore=tests/test_kat_all.py --maxprocesses=10
runs-on: ${{ matrix.runner }}
libjade-build:
- -DOQS_LIBJADE_BUILD=OFF
# Restrict -DOQS_LIBJADE_BUILD=ON build to algs provided by
# libjade to minimise repeated tests
- -DOQS_LIBJADE_BUILD=ON -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
container:
image: ${{ matrix.container }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Configure
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} .. && cmake -LA -N ..
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} ${{ matrix.libjade-build }} .. && cmake -LA -N ..
- name: Build
run: ninja
working-directory: build
Expand Down Expand Up @@ -267,6 +290,16 @@ jobs:
- -DCMAKE_C_COMPILER=gcc-13
- -DOQS_USE_OPENSSL=OFF
- -DBUILD_SHARED_LIBS=ON -DOQS_DIST_BUILD=OFF
libjade-build:
- -DOQS_LIBJADE_BUILD=OFF
# Restrict -DOQS_LIBJADE_BUILD=ON build to algs provided by
# libjade to minimise repeated tests
- -DOQS_LIBJADE_BUILD=ON -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
exclude:
# macos-14 runs on aarch64, libjade targets x86
# Skip testing libjade on macos-14
- os: macos-14
SWilson4 marked this conversation as resolved.
Show resolved Hide resolved
libjade-build: -DOQS_LIBJADE_BUILD=ON -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
runs-on: ${{ matrix.os }}
steps:
- name: Install Python
Expand All @@ -282,7 +315,7 @@ jobs:
- name: Get system information
run: sysctl -a | grep machdep.cpu
- name: Configure
run: mkdir -p build && cd build && source ~/.bashrc && cmake -GNinja -DOQS_STRICT_WARNINGS=ON ${{ matrix.CMAKE_ARGS }} .. && cmake -LA -N ..
run: mkdir -p build && cd build && source ~/.bashrc && cmake -GNinja -DOQS_STRICT_WARNINGS=ON ${{ matrix.CMAKE_ARGS }} ${{ matrix.libjade-build }} .. && cmake -LA -N ..
- name: Build
run: ninja
working-directory: build
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ permissions:
on:
schedule:
- cron: "5 0 * * 0"
workflow_dispatch:

env:
# Semi-colon separated list of algorithims with libjade implementations to
# be passed as input to CMake option as: -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
# See CONFIGURE.md under ## OQS_MINIMAL_BUILD
LIBJADE_ALG_LIST: "KEM_kyber_512;KEM_kyber_768"

jobs:
constant-time-x64:
Expand Down Expand Up @@ -52,13 +59,18 @@ jobs:
container: openquantumsafe/ci-ubuntu-focal-x86_64:latest
CMAKE_ARGS: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=auto
PYTEST_ARGS: --numprocesses=auto -k 'test_kat_all'
libjade-build:
- -DOQS_LIBJADE_BUILD=OFF
# Restrict -DOQS_LIBJADE_BUILD=ON build to algs provided by
# libjade to minimise repeated tests
- -DOQS_LIBJADE_BUILD=ON -DOQS_MINIMAL_BUILD=$LIBJADE_ALG_LIST
container:
image: ${{ matrix.container }}
steps:
- name: Checkout code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Configure
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} .. && cmake -LA -N ..
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} ${{ matrix.libjade-build }}.. && cmake -LA -N ..
- name: Build
run: ninja
working-directory: build
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ project(liboqs C ASM)
option(OQS_DIST_BUILD "Build distributable library with optimized code for several CPU microarchitectures. Enables run-time CPU feature detection." ON)
option(OQS_BUILD_ONLY_LIB "Build only liboqs and do not expose build targets for tests, documentation, and pretty-printing available." OFF)
set(OQS_MINIMAL_BUILD "" CACHE STRING "Only build specifically listed algorithms.")
option(OQS_LIBJADE_BUILD "Enable formally verified implementation of supported algorithms from libjade." OFF)
option(OQS_PERMIT_UNSUPPORTED_ARCHITECTURE "Permit compilation on an an unsupported architecture." OFF)
option(OQS_STRICT_WARNINGS "Enable all compiler warnings." OFF)
option(OQS_EMBEDDED_BUILD "Compile liboqs for an Embedded environment without a full standard library." OFF)
Expand Down Expand Up @@ -95,6 +96,10 @@ else()
message(FATAL_ERROR "Unknown or unsupported processor: " ${CMAKE_SYSTEM_PROCESSOR} ". Override by setting OQS_PERMIT_UNSUPPORTED_ARCHITECTURE=ON")
endif()

if (NOT ((CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin") AND (ARCH_X86_64 STREQUAL "ON")) AND (OQS_LIBJADE_BUILD STREQUAL "ON"))
message(FATAL_ERROR "Building liboqs with libjade implementations from libjade is only supported on Linux and Darwin on x86_64.")
endif()

# intentionally don't switch to variables to avoid --warn-uninitialized report
if(OQS_USE_CPU_EXTENSIONS)
message(FATAL_ERROR "OQS_USE_CPU_EXTENSIONS is deprecated")
Expand Down
17 changes: 17 additions & 0 deletions CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ The following options can be passed to CMake before the build file generation pr
- [OQS_ENABLE_TEST_CONSTANT_TIME](#OQS_ENABLE_TEST_CONSTANT_TIME)
- [OQS_STRICT_WARNINGS](#OQS_STRICT_WARNINGS)
- [OQS_EMBEDDED_BUILD](#OQS_EMBEDDED_BUILD)
- [OQS_LIBJADE_BUILD](#OQS_LIBJADE_BUILD)
- [OQS_ENABLE_LIBJADE_KEM_ALG/OQS_ENABLE_LIBJADE_SIG_ALG](#OQS_ENABLE_LIBJADE_KEM_ALG/OQS_ENABLE_LIBJADE_SIG_ALG)

## BUILD_SHARED_LIBS

Expand Down Expand Up @@ -198,3 +200,18 @@ At the moment, this is **only** considered for random number generation, as both
**Attention**: When this option is enabled, you have to supply a custom callback for obtaining random numbers using the `OQS_randombytes_custom_algorithm()` API before accessing the cryptographic API. Otherwise, all key generation and signing operations will fail.

**Default**: `OFF`.

## OQS_LIBJADE_BUILD
Can be `ON` or `OFF`. When `ON` liboqs is built to use high assurance implementations of cryptographic algorithms from [Libjade](https://github.com/formosa-crypto/libjade). The cryptographic primitives in Libjade are written using [Jasmin](https://github.com/jasmin-lang/jasmin) and built using the Jasmin compiler. The Jasmin compiler is proven (in Coq) to preserve semantic correctness of a program, maintain secret-independence of control flow, and maintain secret independence of locations of memory access through compilation. Additionally, the Jasmin compiler guarantees thread safety because Jasmin doesn't support global variables.

At the moment, Libjade only provides Kyber512 and Kyber768 KEMs.

At the moment, libjade only supports Linux and Darwin based operating systems on x86_64 platforms.

**Default** `OFF`.

## OQS_ENABLE_LIBJADE_KEM_ALG/OQS_ENABLE_LIBJADE_SIG_ALG

Note: `ALG` in `OQS_ENABLE_LIBJADE_KEM_ALG/OQS_ENABLE_LIBJADE_SIG_ALG` should be replaced with the specific algorithm name as demonstrated in OQS_ENABLE_KEM_ALG/OQS_ENABLE_SIG_ALG.

**Default**: `OFF` if OQS_LIBJADE_BUILD is `OFF` else unset.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ liboqs includes some third party libraries or modules that are licensed differen
- `src/kem/classic_mceliece/pqclean_*`: public domain
- `src/kem/kyber/pqcrystals-*`: public domain (CC0) or Apache License v2.0
- `src/kem/kyber/pqclean_*`: public domain (CC0), and public domain (CC0) or Apache License v2.0, and public domain (CC0) or MIT, and MIT
- `src/kem/kyber/libjade_*` public domain (CC0) or Apache License v2.
- `src/kem/ml_kem/pqcrystals-*`: public domain (CC0) or Apache License v2.0
- `src/sig/dilithium/pqcrystals-*`: public domain (CC0) or Apache License v2.0
- `src/sig/dilithium/pqclean_*`: public domain (CC0), and public domain (CC0) or Apache License v2.0, and public domain (CC0) or MIT, and MIT
Expand Down
2 changes: 1 addition & 1 deletion docs/.Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ TOC_INCLUDE_HEADINGS = 0
# The default value is: DOXYGEN.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.

MARKDOWN_ID_STYLE = DOXYGEN
MARKDOWN_ID_STYLE = GITHUB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary/related to a libjade integration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't. I likely made this change while debugging documentation generation and this option fixes some issues I was facing with GH style anchors.


# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
Expand Down
8 changes: 8 additions & 0 deletions docs/algorithms/kem/kyber.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
- **oldpqclean-aarch64**:<a name="oldpqclean-aarch64"></a>
- **Source**: https://github.com/PQClean/PQClean/commit/8e220a87308154d48fdfac40abbb191ac7fce06a with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT) and MIT
- **Formally-verified Implementation sources**:
- **libjade**:<a name="libjade"></a>
- **Source**: https://github.com/formosa-crypto/libjade/tree/release/2023.05-2 with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: CC0-1.0 OR Apache-2.0


## Parameter set summary
Expand All @@ -30,6 +34,8 @@
| [Primary Source](#primary-source) | ref | All | All | None | True | True | False |
| [Primary Source](#primary-source) | avx2 | x86\_64 | Linux,Darwin | AVX2,BMI2,POPCNT | True | True | False |
| [oldpqclean-aarch64](#oldpqclean-aarch64) | aarch64 | ARM64\_V8 | Linux,Darwin | None | True | False | False |
| [libjade](#libjade) | ref | x86\_64 | Linux,Darwin | None | True | False | False |
| [libjade](#libjade) | avx2 | x86\_64 | Linux,Darwin | AVX2,BMI2,POPCNT | True | False | False |

Are implementations chosen based on runtime CPU feature detection? **Yes**.

Expand All @@ -42,6 +48,8 @@ Are implementations chosen based on runtime CPU feature detection? **Yes**.
| [Primary Source](#primary-source) | ref | All | All | None | True | True | False |
| [Primary Source](#primary-source) | avx2 | x86\_64 | Linux,Darwin | AVX2,BMI2,POPCNT | True | True | False |
| [oldpqclean-aarch64](#oldpqclean-aarch64) | aarch64 | ARM64\_V8 | Linux,Darwin | None | True | False | False |
| [libjade](#libjade) | ref | x86\_64 | Linux,Darwin | None | True | False | False |
| [libjade](#libjade) | avx2 | x86\_64 | Linux,Darwin | AVX2,BMI2,POPCNT | True | False | False |

Are implementations chosen based on runtime CPU feature detection? **Yes**.

Expand Down
53 changes: 53 additions & 0 deletions docs/algorithms/kem/kyber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ optimized-upstreams:
with copy_from_upstream patches
spdx-license-identifier: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT)
and MIT
formally-verified-upstreams:
libjade:
source: https://github.com/formosa-crypto/libjade/tree/release/2023.05-2 with
copy_from_upstream patches
spdx-license-identifier: CC0-1.0 OR Apache-2.0
parameter-sets:
- name: Kyber512
claimed-nist-level: 1
Expand Down Expand Up @@ -72,6 +77,30 @@ parameter-sets:
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- upstream: libjade
upstream-id: ref
supported-platforms:
- architecture: x86_64
operating_systems:
- Linux
- Darwin
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- upstream: libjade
upstream-id: avx2
supported-platforms:
- architecture: x86_64
operating_systems:
- Linux
- Darwin
required_flags:
- avx2
- bmi2
- popcnt
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- name: Kyber768
claimed-nist-level: 3
claimed-security: IND-CCA2
Expand Down Expand Up @@ -117,6 +146,30 @@ parameter-sets:
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- upstream: libjade
upstream-id: ref
supported-platforms:
- architecture: x86_64
operating_systems:
- Linux
- Darwin
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- upstream: libjade
upstream-id: avx2
supported-platforms:
- architecture: x86_64
operating_systems:
- Linux
- Darwin
required_flags:
- avx2
- bmi2
- popcnt
no-secret-dependent-branching-claimed: true
no-secret-dependent-branching-checked-by-valgrind: false
large-stack-usage: false
- name: Kyber1024
claimed-nist-level: 5
claimed-security: IND-CCA2
Expand Down
Loading
Loading