25 Commits

Author SHA1 Message Date
Bruce
f629296e28
Remove Dilithium (#2275)
* Removed upstream `name: pqcrystals-dilithium` and signature `name: dilithium` from `copy_from_upstream.yml`.
Removed everything under `src/sig/dilithium`
Re-run `copy_from_upstream.py -d copy`, which produced downstream changes to various build files.

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* remove Dilithium entries from kats.json

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* remove Dilithium entries from constant_time tests

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed dilithium.yml and dilithium.md. Re-run copy_from_upstream.py, which also updated README.md and cbom.json

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed Dilithium from FUZZING.md

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* removed license information about pqclean Dilithium and pqcrystals-dilithium from README.md. README.md still mentions Dilithium but only to say that it has been excluded

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Upgraded CONFIGURE.md minimal build example to ML-KEM-768 and ML-DSA-44

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Upgraded C++ sig linking test to ML-DSA-44; also added option to make the test fail hard if the algorithm is not enabled

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* remove Dilithium from GitHub action workflows

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* removed Dilithium from zephyr configuration and examples

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed scripts/copy_from_upstream/patches/pqclean-dilithium-arm-randomized-signing.patch

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed dilithium from upstream.name==pqclean.ignore

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed orphaned patches

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

---------

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-09-22 20:52:14 -04:00
nonam3e
16b8629972
Icicle-pqc integration (#2216)
* correct build

Signed-off-by: nonam3e <timur@ingonyama.com>

* use interface to link

Signed-off-by: nonam3e <timur@ingonyama.com>

* remove load backends

Signed-off-by: nonam3e <timur@ingonyama.com>

* liboqs 0.14.0 release candidate 1 (#2180)

* Prepare 0.14.0 release candidate 1 [full tests] [extended tests]

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Update release notes with deprecation and security info [skip ci]

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

---------

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: nonam3e <timur@ingonyama.com>

* add icicle in scripts

Signed-off-by: nonam3e <timur@ingonyama.com>

* update docs

Signed-off-by: nonam3e <timur@ingonyama.com>

* add link

Signed-off-by: nonam3e <timur@ingonyama.com>

* build with local package

Signed-off-by: nonam3e <timur@ingonyama.com>

* update scripts

Signed-off-by: nonam3e <timur@ingonyama.com>

* choose alg -DOQS_ENABLE_KEM_ml_kem_512_icicle_cuda=ON -DOQS_ENABLE_KEM_ml_kem_768_icicle_cuda=OFF

Signed-off-by: nonam3e <timur@ingonyama.com>

* docs

Signed-off-by: nonam3e <timur@ingonyama.com>

* OQS_STATUS return type

Signed-off-by: nonam3e <timur@ingonyama.com>

* Document public / internal API split [skip ci] (#2182)

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: nonam3e <timur@ingonyama.com>

* liboqs 0.14.0 release (#2198)

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: nonam3e <timur@ingonyama.com>

* manual build

Signed-off-by: nonam3e <timur@ingonyama.com>

* remove tmp

Signed-off-by: nonam3e <timur@ingonyama.com>

* build statically with target_link_libraries

Signed-off-by: nonam3e <timur@ingonyama.com>

* Switch to dev mode for 0.14.1 (#2199)

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: nonam3e <timur@ingonyama.com>

* update ACVP to 1.1.0.40 (#2172)

Signed-off-by: Abhinav Saxena <abhinav.saxena@thalesgroup.com>
Signed-off-by: nonam3e <timur@ingonyama.com>

* Added Custom Timeout to CI (#2189)

* Added Custom Timeout to CI

Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>

* remove unnecessary comment

Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>

* Use correct syntax for timeout in jobs that span multiple files

Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>

---------

Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>
Signed-off-by: nonam3e <timur@ingonyama.com>

* Update nixpkgs from 24.05 to 25.05 (#2187)

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
Signed-off-by: nonam3e <timur@ingonyama.com>

* update commit

Signed-off-by: nonam3e <timur@ingonyama.com>

* icicle pqc package cmd in CONFIGURE.md

Signed-off-by: nonam3e <timur@ingonyama.com>

* remove unnecessary targets from cmake config

Signed-off-by: nonam3e <timur@ingonyama.com>

* add SPDX-License-Identifier header

Signed-off-by: nonam3e <timur@ingonyama.com>

---------

Signed-off-by: nonam3e <timur@ingonyama.com>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: Abhinav Saxena <abhinav.saxena@thalesgroup.com>
Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>
Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Abhinav Saxena <abhinav.saxena@thalesgroup.com>
Co-authored-by: Kitsios Konstantinos <kitsios.konst@gmail.com>
Co-authored-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
2025-08-14 09:52:26 -04:00
Spencer Wilson
4215362acb
Merge commit from fork
* Enable constant-time testing for -O3 builds [extended tests]

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Add regression test for HQC constant-time issues

* Build HQC without optimizations

---------

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2025-06-23 14:36:48 -04:00
Aiden Fox Ivey
47b8fdd404
Adding code coverage (#2148)
* First stab at adding coverage tests

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Install dependencies for coveralls action

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Integrate code coverage into CI

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Properly parallelize

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Refine test coverage

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Ignore unused exclude path error

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Update exclude path

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Fix Markdown formatting

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Pin dependencies

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Update workflow badge path

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>

* Fix path in CI.md

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>

* Remove unnecessary call to install curl

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>

---------

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2025-06-19 14:45:44 -04:00
Steven I Reeves
6a16ac68b5
NVIDIA: Adding cuPQC as a backend for ML-KEM. (#2044)
* Adding cuPQC as a backend for ML-KEM.

Signed-off-by: Steven Reeves <sreeves@nvidia.com>

* Fixing transposition error that left out OQS_USE_CUPQC in CMake system.

Signed-off-by: Steven Reeves <sreeves@nvidia.com>

* Add CMake dependent options for cupqc. Fixed formatting in kem_ml_kem_####.c and kem/family/kem_scheme.c

Signed-off-by: Steven Reeves <sreeves@nvidia.com>

* Move cupqc_ml-kem source files to correctly named dir

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Stop piggybacking on pqcrystals-kyber-standard and move cupqc_ml-kem metadata to separate upstream repo

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update licensing information

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update PLATFORMS.md

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix kem_family cmakelists template

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Run copy_from_upsream.py and pull updated upstream

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Add cupqc build test to basic.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Move cupqc build test from basic.yml to linux.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix error in linux.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fixup! Fix error in linux.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Redo cupqc build check

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Supply default CUDA arch to cupqc-buildcheck configuration stage

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Specify CUDAXX in cupqc-buildcheck

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Make cuPQC_DIR explicit in cupqc-buildcheck

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

---------

Signed-off-by: Steven Reeves <sreeves@nvidia.com>
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
Co-authored-by: Pravek Sharma <sharmapravek@gmail.com>
2025-01-27 18:17:05 -05:00
Nathaniel Brough
0310631c5f
Add a basic fuzz testing harness for Dilithium2 (#1905)
* Add a basic fuzz testing harness for dilithium2

Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Nathaniel Brough <nathaniel.brough@gmail.com>

* Add basic build checks for fuzz tests

Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Nathaniel Brough <nathaniel.brough@gmail.com>

---------

Signed-off-by: Nathaniel Brough <nathaniel.brough@gmail.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2024-10-18 13:16:23 -04:00
Pravek Sharma
e520ec1c38
Integrate Kyber from libjade (#1745)
* Add copy_from_libjade.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Modify copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Add patches for libjade Kyber code

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update alg_support.cmake templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM famiy templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Correct copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Modify copy_from_upstream.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM family templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix KEM family templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix KEM family templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update templates for build system files

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update build system files

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix add_enable_by_alg_conditional.libjade

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Run copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM family templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update copy_from_upstream.yml with libjade implementation info

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Edit KEM templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Run copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix KEM temlates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Run copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Add libjade_shim

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Add jasmin/libjade namespaces to test_binary.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update testing

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Allow manually triggering CI tests

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Change container for upstreamcheck in unix.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Edit unix.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Edit unix.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Restrict copying of code from libjade repo to relevant files

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Remove irrelevant libjade code

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Remove redundant KEM templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update KEM template to accomodate new dir structure

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Debug: tweak unix.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Re-build libjade with jasmin version used in CI

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Debug: undo unix.yml tweak

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Allow MSVC to ignore libjade_shims

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Simplify name scheme for libjade code

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update alg docs, libjade code name scheme, and license

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update copy_from_upstream documentation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix copy_from_upstream.py and simply libjade code name scheme

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update alg docs and CBOM

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Correct alg doc generation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Generate CBOM with unique bom-ref

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Cleanup unix.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix patches to include api.c; fix kem templates

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix kyber patch

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* turn off weekly constant time tests for libjade implementations

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* update documentation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* change upstream to stable libjade release

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix kyber documentation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix kyber documentation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix kem template again

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix weekly.yml and unix.yml to test libjade code

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* rename libjade asm files from *.s to *.S

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* end libjade_kyber*/api.c files with newline

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix kem template to prevent duplicate symbols in object files

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix indentation in weekly.yml

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* skip testing libjade on macos-14 in CI

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* use release tag/branch with libjade upstream url instead of commit

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix build error when OQS_ENABLE_LIBJADE_KEM_ALG=OFF

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* initialize LIBJADE_RANDOMBYTES when OQS_LIBJADE_BUILD=OFF

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* remove redundant comment

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix comment typo

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* make string explicit when comparing with variable in cmake

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* add libjade kyber licensing to README.md

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* remove reference to oldpqclean_kyber* code from libjade if branchin kem_kyber_*.c

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update CMakeLists.txt

Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* track jasminc version in copy_from_libjade.yml; check jasminc version in copy_from_upstream.py

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* add OQS_LIBJADE_BUILD to build flags output

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* remove link from CONFIGURE.md

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Update libjade to dual license

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Patch gcc version for MacOS CI runs

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix doc generation

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* Fix libjade docs

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* fix license info in README.md

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

* update libjade_randombytes spdx-license

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

---------

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2024-08-18 12:02:37 -04:00
Basil Hess
4cc88845e8
Add MAYO signature scheme from NIST onramp (#1707)
Add MAYO signature scheme from NIST onramp, C and AVX2 versions
Add AES128CTR to common code

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2024-07-13 21:38:01 +02:00
Norman Ashley
971173ad82
Add Stateful Signature (XMSS and LMS) (#1650)
Add support for LMS and XMSS. Key generation and signing are disabled behind a feature flag labelled "hazardous experimental."

---------

Signed-off-by: Duc Tri Nguyen <dnguye69@gmu.edu>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Norman Ashley <nashley@cisco.com>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Co-authored-by: Duc Tri Nguyen <dnguye69@gmu.edu>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
Co-authored-by: Duc Nguyen <106774416+ducnguyen-sb@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Duc Nguyen <ductri.nguyen@sandboxquantum.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Jason Goertzen <133878263+jgoertzen-sb@users.noreply.github.com>
2024-06-05 15:59:40 -04:00
Dmitry Belyavskiy
a5ec23cf19
Algorithm selection clarification (#1784)
Resolves: #1781

Signed-off-by: Dmitry Belyavskiy <beldmit@gmail.com>
2024-05-07 16:00:13 +02:00
Daiki Ueno
32afec8fcc
Add option to dynamically load libcrypto.so.* (#1603)
* sha2: Use EVP_MD_CTX_free instead of EVP_MD_CTX_destroy

According to the manual page, EVP_MD_CTX_destroy has been renamed to
EVP_MD_CTX_free in OpenSSL 1.1.0 and only provided as a compatibility
macro in later OpenSSL releases:
https://www.openssl.org/docs/man1.1.1/man3/EVP_MD_CTX_free.html

Signed-off-by: Daiki Ueno <dueno@redhat.com>

* ossl_helpers: Use pthread_once instead of CRYPTO_THREAD_run_once

Throughout the code base, liboqs uses pthread_once for one-shot
initialization and falls back to thread-unsafe code if it is not
supported nor enabled on the system.  For consistency and to remove
additional dependency on OpenSSL, this switches the use of
CRYPTO_THREAD_run_once with that.

Signed-off-by: Daiki Ueno <dueno@redhat.com>

* Make common algorithms pluggable

This allows applications to replace the implementation of common
cryptographic algorithms at runtime, by setting callback functions for
each operations with OQS_AES_set_callbacks, OQS_SHA2_set_callbacks,
OQS_SHA3_set_callbacks, and OQS_SHA3_x4_callbacks.  Those functions
may be called once before OQS_init; otherwise the default
implementation will be used.

Signed-off-by: Daiki Ueno <dueno@redhat.com>

* Add option to dynamically load libcrypto.so.*

This adds OQS_DLOPEN_OPENSSL build option to use OpenSSL through
dynamically loaded libcrypto.so.* with dlopen, instead of linking to
the library at build time.

That way the applications could use their favorite implementation of
common cryptographic primitives without pulling in the OpenSSL as a
hard dependency.

Signed-off-by: Daiki Ueno <dueno@redhat.com>

* Add tests for OQS_*_set_callbacks

This adds tests that exercise OQS_*_set_callbacks by overriding one of
the function of each and ensuring the wrapper function is called.

Signed-off-by: Daiki Ueno <dueno@redhat.com>

---------

Signed-off-by: Daiki Ueno <dueno@redhat.com>
2024-04-05 16:20:17 +02:00
PI
7a6df815bb
Document Fix (#1735)
Signed-off-by: PI <74706004+pi-314159@users.noreply.github.com>
2024-04-04 14:01:52 -04:00
Michael Baentsch
9ede9e232b
remove references to unsupported openssh [skip ci] (#1713) 2024-03-04 08:59:12 +01:00
Spencer Wilson
93c5d489c7 Remove reference to old BIKE variants from CONFIGURE.md [skip ci] 2024-01-22 15:25:42 -05:00
Tobias Frauenschläger
4906c3fc88
Add support for embedded Zephyr RTOS (#1621)
* Zephyr RTOS support

This commit adds initial support for the zephyr operating system. Some
minor changes to the library build system have been made for it to be
compilable with zephyr. Furthermore, we added support for an embedded
build option to disable standard library methods for random number
generation.

* Zephyr: added algorithm selection

The algorithms can now be selected with Kconfig. Per default, we only
enable the algorithms selected by NIST to be standardized. However, all
supported algorithms can be enabled or disabled individually on a per
project basis.

* Zephyr: added testable samples

Added two sample applications within the zephyr directory for KEMs and
Signatures. These are also intended for CI testing.

* Zephyr: added CI tests

* Zephyr: Add documentation

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2023-12-20 08:20:56 +01:00
Michael Baentsch
b7c623e732
PR template update & OpenSSL clarification (#1582)
* add test requirement to PR template

* add OpenSSL 1.1.1 caveat

* remove OQS-OpenSSL111 and OQS-BoringSSL from PR template checklist

* add link to documentation of OPENSSL_ROOT_DIR
2023-10-17 06:30:03 +02:00
Michael Baentsch
b1d42d61f6
clarify OpenSSL config [skip ci] (#1429) 2023-04-06 07:14:33 +02:00
Michael Baentsch
04ff6fd871
compiler future-proofing Release builds (#1378)
* compiler future-proofing Release builds
2023-02-07 07:24:40 +01:00
Michael Baentsch
da0dd47c5d
Config update (#1361)
* update default configs docs and DIST_BUILD

* toggle OQS_DIST_BUILD CCI tests

* setting ARM64 default for CMAKE_ARGS
2023-01-16 07:08:56 +01:00
Michael Baentsch
fe3cb02cb1
NIST std algs list selection enablement (#1355)
* std/r4/all algs enablement

* Switch example to use Kyber-768.

* std algs as option only

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-01-14 10:01:29 +01:00
Douglas Stebila
f30cae996c
Fix Doxygen Markdown failures (#1349)
* Fix Doxygen Markdown failures

Fixes #1332

* Fix another Doxygen Markdown failure
2023-01-11 18:32:26 -05:00
Michael Baentsch
cdf709864f
Revert "Enable algorithm filtering (#1333)" (#1351)
This reverts commit 9ba752ea9b0b4db375e21d2b27a16ed1de30e2be.
2023-01-11 09:05:49 -05:00
Michael Baentsch
9ba752ea9b
Enable algorithm filtering (#1333)
* std/r4/all algs enablement

* add documentation

* make doxygen happy

* Revert "make doxygen happy"

This reverts commit 9aedf2a7e651e0a686b2c5cade38db9af1e4b988.

* fall back to doxygen 1.9.2

* update github workflow to new filter naming

* adding appveyor testing for new OQS_ALGS_ENABLED option

* don't enable disabled vars

* add empty input test

* documenting focus on standard algs

* correct alg name typo

* Update README.md

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>

* Switch example to use Kyber-768.

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-01-10 20:29:24 -05:00
Basil Hess
719a84ecdd
Integrates pqcrystals with common-aes / extends common code AES CTR-API (#1221)
* Integrates pqcrystals (ref and avx2) with liboqs common AES code (for Kyber-90s and Dilithium-AES).
* Extends libOQS AES-CTR with Incremental API: OQS_AES256_CTR_inc_init, OQS_AES256_CTR_inc_iv, OQS_AES256_CTR_inc_ivu64, OQS_AES256_CTR_inc_stream_iv, OQS_AES256_CTR_inc_stream_blks.
* Adds some AES-CTR shim API.
* Faster AESNI CTR code (improved iv handling, 4x interleaved blocks for higher throughput).
* OpenSSL AES supporting CTR API.
* Updated pqcrystals patches (API, context releases).
* Removes redundant AES implementations from Kyber and Dilithium.
* Copy-from-upstream with updated patches.
* Uses internal AES on x86_64 (dist & AES) because of increased performance with the internal AESNI code.
* Adds AES-CTR benchmarks to speed_common
* Update CONFIGURE.md
2022-06-23 14:44:36 +02:00
Michael Baentsch
608ea188e3
Link documentation and code (#1229)
* move Wiki documentation to source code

* adding CONFIGURE.md to doxyconfig

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2022-06-22 09:59:30 -04:00