* Update example files to use ML-KEM and ML-DSA
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Call example_sig_stfl in test_cmdline.py
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
---------
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Bump jinja2 in /scripts/copy_from_upstream in the pip group (#2036)
Bumps the pip group in /scripts/copy_from_upstream with 1 update: [jinja2](https://github.com/pallets/jinja).
Updates `jinja2` from 3.1.4 to 3.1.5
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)
---
updated-dependencies:
- dependency-name: jinja2
dependency-type: direct:production
dependency-group: pip
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Pablo Gutiérrez <pablogf@MSI.>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* Avoid unresolved symbols from libcrypto when compiled with OQS_DLOPEN_OPENSSL (#2043)
* Do not assume OpenSSL memory functions when libcrypto is dlopened
Otherwise, when the OQS_DLOPEN_OPENSSL is defined but OpenSSL is
used only partially, e.g., with OQS_USE_SHA3_OPENSSL=ON, there will be
some unresolved symbols in the final artifact:
```
$ cmake -GNinja -DBUILD_SHARED_LIBS=ON -DOQS_USE_AES_OPENSSL=ON -DOQS_USE_AES_INSTRUCTIONS=OFF -DOQS_DIST_BUILD=ON -DOQS_USE_SHA3_OPENSSL=ON -DOQS_DLOPEN_OPENSSL=ON -DCMAKE_BUILD_TYPE=Debug -LAH ..
$ ninja
$ nm -g lib/liboqs.so.0.12.1-dev | grep '^[[:space:]]*U '
U __assert_fail@GLIBC_2.2.5
U CRYPTO_free
U CRYPTO_malloc
U dlopen@GLIBC_2.34
U dlsym@GLIBC_2.34
```
Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Wrap OpenSSL memory functions with OSSL_FUNC
This enables those OpenSSL memory functions can be either resolved at
build time or at run-time through dlopen. Note that we use CRYPTO_*
functions instead of OPENSSL_* as the latter are defined as a macro
and cannot be dynamically resolved.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
---------
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Signed-off-by: Pablo Gutiérrez <pablogf@MSI.>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* Added sig_stfl.h path to .Doxyfile INPUT setting
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* added sig_stfl path to .Doxyfile INPUT setting
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* Update to public Ubuntu 24.04 ARM runner [full tests] (#2050)
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* Added Doxygen comments of algorithm identifiers until XMSSMT
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* commit
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* 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>
Signed-off-by: Pablo Gutiérrez <pablogf@MSI.>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* added all algorithm identifiers Doxyfile comments for sig_stfl
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* added additional Doxygen comments to sig_stfl.h
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* fixed formatting
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* fixed return types errors
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
* included sig_stfl API Doxygen documentation [full tests]
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Pablo Gutiérrez <pablogf@MSI.>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Steven Reeves <sreeves@nvidia.com>
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daiki Ueno <dueno@redhat.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Steven I Reeves <sreeves@nvidia.com>
Co-authored-by: Pravek Sharma <sharmapravek@gmail.com>
As a follow-up of commit 64bceb37fafa9b90cf228965079de9ebd77a83b9,
this checks that the library artifacts don't contain any unresolved
symbols from libcrypto.so when it is dynamically loaded.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Do not assume OpenSSL memory functions when libcrypto is dlopened
Otherwise, when the OQS_DLOPEN_OPENSSL is defined but OpenSSL is
used only partially, e.g., with OQS_USE_SHA3_OPENSSL=ON, there will be
some unresolved symbols in the final artifact:
```
$ cmake -GNinja -DBUILD_SHARED_LIBS=ON -DOQS_USE_AES_OPENSSL=ON -DOQS_USE_AES_INSTRUCTIONS=OFF -DOQS_DIST_BUILD=ON -DOQS_USE_SHA3_OPENSSL=ON -DOQS_DLOPEN_OPENSSL=ON -DCMAKE_BUILD_TYPE=Debug -LAH ..
$ ninja
$ nm -g lib/liboqs.so.0.12.1-dev | grep '^[[:space:]]*U '
U __assert_fail@GLIBC_2.2.5
U CRYPTO_free
U CRYPTO_malloc
U dlopen@GLIBC_2.34
U dlsym@GLIBC_2.34
```
Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Wrap OpenSSL memory functions with OSSL_FUNC
This enables those OpenSSL memory functions can be either resolved at
build time or at run-time through dlopen. Note that we use CRYPTO_*
functions instead of OPENSSL_* as the latter are defined as a macro
and cannot be dynamically resolved.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
---------
Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Update script info
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Run copy_from_upstream
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
---------
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* #1830 update scorecard to v5 (gh action 2.4.0)
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
* Pin action version in unix.yml
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
* Schedule only, no PR. Minor updates to scorecard
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
---------
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
* Trigger liboqs-java CI on commits to main
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Trigger liboqs-rust CI on commits to main
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
---------
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Remove hardcoded build paths
This fixes#2018 using `helpers.get_current_build_dir_name()`
Signed-off-by: Iyán Méndez Veiga <me@iyanmv.com>
* Use a random build path in the basic build test
Signed-off-by: Iyán Méndez Veiga <me@iyanmv.com>
---------
Signed-off-by: Iyán Méndez Veiga <me@iyanmv.com>
* Update version numbers for 0.12.0-rc1
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Update list of supported versions
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Update release notes for 0.12.0-rc1
Fixes#1990 and #2004.
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Fix typo and workding [skip ci]
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
* Revise wording on API removal
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Update release date for rc1 [skip ci]
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
---------
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Add defines for OQS version components
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Set OQS_VERSION_TEXT based on new OQS_VERSION_* macros
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Make OQS_VERSION_PRE_RELEASE optionally defined
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Add documentation about OQS_VERSION macros
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
* Clarify wording about definition of OQS_VERSION_PRE_RELEASE
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
---------
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Pull ML-DSA from pq-crystals upstream.
* Removes ML-DSA-ipd
* Adds support for context strings to OQS SIG API.
* Adding _with_ctx_str APIs, templating
* Adds ACVP tests for ML-DSA
* export symbols for acvp tests (dynamic linking)
* remove IPD intermediate values
* adds flag for ctx support
* Update constant-time passes after line nubmer and function name changes
* Update KATs
* API with checks for signatures without ctx support
* Additional test for signatures with ctx
* Change alg_version to FIPS204
* Update ML-DSA security claim to SUF-CMA, according to FIPS204
* Update src/sig/sig.h
* Fix test_alg_info
---------
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Update patch to include version number change
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Run copy_from_upstream
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Generate patch with git diff
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
---------
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Fix LMS crash
Signed-off-by: Norman Ashley <nashley@cisco.com>
* Fixed compile issue on Mac
Signed-off-by: Norman Ashley <nashley@cisco.com>
---------
Signed-off-by: Norman Ashley <nashley@cisco.com>
When OQS_DLOPEN_OPENSSL is designated and low-level primitives are
overridden with OQS_*_set_callbacks, OQS_destroy still indirectly
calls EVP_*_free from OpenSSL. This adds a extra NULL check to
avoid that.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Complete the revival of Travis and CROSS
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Add Travis badge to README
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
---------
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Add a --delete option to copy_from_upstream to remove unwanted implementation subdirectories.
* Enable the --delete option in CI to detect files included by mistake
* Switch to git status --porcelain in CI for script stability
* Remove unused SPHINCS+ aarch64 implementation using the --delete option
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Add new API to clean up OpenSSL threads.
Signed-off-by: Norman Ashley <nashley@cisco.com>
* Updates per review comments.
Signed-off-by: Norman Ashley <nashley@cisco.com>
* Update format
Signed-off-by: Norman Ashley <nashley@cisco.com>
* Apply suggestions from code review
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: Norman Ashley <nashley@cisco.com>
---------
Signed-off-by: Norman Ashley <nashley@cisco.com>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
* Add speed_sig_stfl
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* Fix speed_sig_stfl.c: limit timing with max sig ops & provide required secure keystore with dummy keystore
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* Cleanup speed_sig_stfl.c
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* speed_sig_stfl: fix for LMS (secure store context must not be NULL), refresh key when out of sigs for sig benchmark
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* tests/speed_sig_stfl.c: astyle fix
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* tests/speed_sig_stfl.c: stfl sig benchmarks require intermittent resetting of secret key
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* speed_sig_stfl: add speed_sig_stfl to: README scripts/nogress.sh tests/test_speed.py
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* test_speed.py: limit testing of stfl sigs to parameters with 2^10 max sigs
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* scripts/nogress.sh: limit regression tests on stfl sigs to only algorithms with 2^10 max sigs
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* speed_sig_stfl.c: astyle fix
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* speed_sig_stfl: 1) fix use-after-free bug. 2) Simply return success if keygen and sign are not enabled.
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
---------
Signed-off-by: cr-marcstevens <github@marc-stevens.nl>
* [#1823] replace malloc/calloc/strdup/free with openssl allocator
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* [#1823] update memory allocator for copy_from_upstream
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* [#1823] Use OpenSSL Memory Allocator for BIKE, FrodoKEM, and NTRUPrime
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* [#1823] Add Comments for Doxygen
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* include openssl/crypto.h and resolve conflict varible for ntru
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add openssl version check to fix build error
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Fix build for OQS_DLOPEN_OPENSSL
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* remove OQS_MEM_free
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add allocator check in tests/test_code_conventions.py
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add IGNORE memory-check
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Delect checked allocation functions
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Revert back p_param to p for sntrup
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add allocator check for '.c', '.h', '.fragment'
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add NULL for previous checked allocation
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Add fprintf error for abort cases
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* use OQS_EXIT_IF_NULLPTR for checked malloc cases
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
---------
Signed-off-by: Songling Han <shan@paloaltonetworks.com>
* Revert to latest Zephyr SDK container
* Fix for Zephyr build (missing include for ptrdiff_t)
* Zephyr CI tests are now using Zepyhr V3.4 (minimal supported version)
and Zephyr V3.7 (current LTS release)
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
If a user has passed a custom build path to cmake, and then calls for
example `ninja -C <custom_build_path> run_tests`, the script
test_acvp_vectors.py fails due to having "build" harcoded in the calls.
Instead, let's use `helpers.get_current_build_dir_name()` to get the build
path and use that instead. This is already done in other scripts (e.g.,
test_binary.py)
Signed-off-by: Iyán Méndez Veiga <me@iyanmv.com>