Skip to content

Commit

Permalink
Merge ps-libjade
Browse files Browse the repository at this point in the history
commit c10ac1f
Author: Pravek Sharma <[email protected]>
Date:   Wed Sep 18 13:56:35 2024 -0400

    fixup! Update fullbuild.sh to support -DOQS_LIBJADE_BUILD

    Signed-off-by: Pravek Sharma <[email protected]>

commit 12b45c7
Author: Pravek Sharma <[email protected]>
Date:   Wed Sep 18 13:20:24 2024 -0400

    Update macos CI to build liboqs with -DOQS_LIBJADE_BUILD=ON

    Signed-off-by: Pravek Sharma <[email protected]>

commit f7d3919
Author: Pravek Sharma <[email protected]>
Date:   Wed Sep 18 13:17:28 2024 -0400

    Update CONFIGURE.md

    Signed-off-by: Pravek Sharma <[email protected]>

commit f220830
Author: Pravek Sharma <[email protected]>
Date:   Wed Sep 18 13:16:31 2024 -0400

    Update fullbuild.sh to support -DOQS_LIBJADE_BUILD

    Signed-off-by: Pravek Sharma <[email protected]>
  • Loading branch information
SWilson4 committed Sep 26, 2024
1 parent e426a40 commit 894d65d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
key: ${{ runner.os }}-openssl32
- name: build liboqs
run: |
cmake -DOPENSSL_ROOT_DIR=../.localopenssl32 -DCMAKE_INSTALL_PREFIX=../.localliboqs ${{ matrix.params.oqsconfig }} -S . -B _build
cmake -DOPENSSL_ROOT_DIR=../.localopenssl32 -DCMAKE_INSTALL_PREFIX=../.localliboqs -DOQS_LIBJADE_BUILD=ON ${{ matrix.params.oqsconfig }} -S . -B _build
cmake --build _build
cmake --install _build
working-directory: liboqs
Expand Down
12 changes: 12 additions & 0 deletions CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,18 @@ facilitated by setting the `liboqs` build option `-DOQS_ALGS_ENABLED=STD` when b
`liboqs`. The list of algorithms supported by `oqs-provider` is defined by
the contents of the file `generate.yml` documented in the [pre-build configuration](#pre-build-configuration).
### OQS_LIBJADE_BUILD
This environment variable lets you specify the build option `-DOQS_LIBJADE_BUILD` for building liboqs when using the `fullbuild.sh` script. If this environment variable is not set `fullbuild.sh` defaults to building liboqs with `-DOQS_LIBJADE_BUILD=ON`.
When building liboqs with `-DOQS_LIBJADE_BUILD=ON`, default implementations of post-quantum algorithms are replaced with formally verified implementations sourced from libjade[https://github.com/formosa-crypto/libjade] (if liboqs provied such an implementation.) Please refer to [liboqs documentation](https://github.com/open-quantum-safe/liboqs/blob/main/CONFIGURE.md#oqs_libjade_build) to see which algorithms have formally verified implementations and learn more about the `-DOQS_LIBJADE_BUILD` build option.
For example, in order to build liboqs with `-DOQS_LIBJADE_BUILD=OFF`, you might run:
```
$ env OQS_LIBJADE_BUILD="OFF" bash scripts/fullbuild.sh
```
## Runtime options
The `openssl` [property selection mechanism](https://www.openssl.org/docs/manmaster/man7/property.html)
Expand Down
8 changes: 7 additions & 1 deletion scripts/fullbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ else
export DOQS_ALGS_ENABLED="-DOQS_ALGS_ENABLED=$OQS_ALGS_ENABLED"
fi

if [ -z "$OQS_LIBJADE_BUILD"]; then
export DOQS_LIBJADE_BUILD="-DOQS_LIBJADE_BUILD=ON"
else
export DOQS_LIBJADE_BUILD="-DOQS_LIBJADE_BUILD=$OQS_LIBJADE_BUILD"
fi

if [ -z "$OPENSSL_INSTALL" ]; then
openssl version | grep "OpenSSL 3" > /dev/null 2>&1
#if [ \($? -ne 0 \) -o \( ! -z "$OPENSSL_BRANCH" \) ]; then
Expand Down Expand Up @@ -109,7 +115,7 @@ if [ -z $liboqs_DIR ]; then
# STD: only include NIST standardized algorithms
# NIST_R4: only include algorithms in round 4 of the NIST competition
# All: include all algorithms supported by liboqs (default)
cd liboqs && cmake -GNinja $CMAKE_PARAMS $DOQS_ALGS_ENABLED $CMAKE_OPENSSL_LOCATION -DCMAKE_INSTALL_PREFIX=$(pwd)/../.local -S . -B _build && cd _build && ninja && ninja install && cd ../..
cd liboqs && cmake -GNinja $CMAKE_PARAMS $DOQS_ALGS_ENABLED $CMAKE_OPENSSL_LOCATION $DOQS_LIBJADE_BUILD -DCMAKE_INSTALL_PREFIX=$(pwd)/../.local -S . -B _build && cd _build && ninja && ninja install && cd ../..
if [ $? -ne 0 ]; then
echo "liboqs build failed. Exiting."
exit -1
Expand Down

0 comments on commit 894d65d

Please sign in to comment.