267 Commits

Author SHA1 Message Date
Ganyu (Bruce) Xu
e0b57e2f1e resolved failure to consistently produce the same README.md
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
54256d31d7 algorithm family names will not link to docs/algorithms markdowns because Doxygen cannot handle them
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
57308e3d60 fixed invalid markdown anchors
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
3a9f2abfd5 documentation; make primary implementation monospaced
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
b25cdb3298 Use split with no argument to split against any whitespace, not just space
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
40cc1a508a wrap standardization status with url to spec
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
606ef108c6 some refactoring
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
c52e0f42c3 first draft of alg support table
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
44002abae2 still need to fill in the content
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
Ganyu (Bruce) Xu
7849f3fced algorithm support table should replace the list of algorithms; minor refactor w.r.t. shebang, imports, and unnecessary global states
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-10-01 10:14:33 -04:00
nonam3e
e64026e27a
Fix/icicle ml kem 768 (#2288)
* fix 768 version

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

* update upstream git commit

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

---------

Signed-off-by: nonam3e <timur@ingonyama.com>
2025-10-01 09:24:35 -04:00
Douglas Stebila
b6c875f196
Disable strict aliasing on SPHINCS+-SHAKE (#2264)
* Disable strict aliasing on SPHINCS+-SHAKE

Fixes #2210

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

* Missed a few variants

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

---------

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
2025-09-23 08:42:11 -04:00
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
Bruce
390b906d19
Patch ICICLE ML-KEM for deterministic encapsulation (#2258)
* patch ICICLE ML-KEM to include enc_derand, but they are not tested

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

* copy_from_upstream.py added deterministic encapsulation info to NTRU docs

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

---------

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
2025-09-15 10:09:26 -04:00
Saito Masataka
59bf831b47
Add NTRU back (#2176)
This commit includes following changes:
* Revert "Removed NTRU. (#1335)"
* Replace the uses of malloc with OQS_MEM_malloc
* Add a derandomized keypair function
* Add "all" entries of NTRU algorithms to the KATs file
* Fix reflecting the removal of NTRU from PQClean
* Update NTRU documents with the latest manners
* Change the CODEOWNERS of NTRU KEM

Signed-off-by: Saito Masataka <saitomst@intellilink.co.jp>
2025-09-09 17:10:28 -04:00
Marco Gianvecchio
f58b45a087
Update CROSS to version 2.2 (#2247)
* update CROSS to version 2.2
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* in CROSS-RSDPG memset vector to 0 before AVX2 exponentiation
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* in CROSS-RSDPG memset vector to 0 before AVX2 exponentiation
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
2025-09-09 17:03:45 -04:00
Rodrigo Martín
c62031ee75
Include DeriveEncapsulation functionality (Issue #2135) (#2221)
* Include 'encaps_derand' functionality

Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>

* Add changes pertaining to upstream copy

Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>

* Add co-author

Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>

* Fix formatting

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

* Modify 'vectors_kem.c' to employ '_derand' API

Signed-off-by: Rodrigo Martin Sánchez-Ledesma <rmsanchezledesma@indra.es>

---------

Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: Rodrigo Martin Sánchez-Ledesma <rmsanchezledesma@indra.es>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
Co-authored-by: Rodrigo Martin Sánchez-Ledesma <rmsanchezledesma@indra.es>
2025-08-27 10:05:41 -04:00
h2parson
cbffa331d5
SLH-DSA ACVP tests (#2237)
* apply slh acvp branch

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* remove openssl/bio.h include

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix windows __attribute__ issue

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* Update tests/vectors_sig.c [skip ci]

Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>

---------

Signed-off-by: h2parson <h2parson@uwaterloo.ca>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2025-08-27 09:43:57 -04:00
Aiden Fox Ivey
1698d86177
Upgrade Jinja to 3.1.6 (#2214)
* Upgrade Jinja to 3.1.6

As per
https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7
use of Jinja 3.1.5 has a vulnerability. It's probably not an incredible problem,
but it would be best to upgrade these packages to stay updated with bugfixes.

This follows the Nix flake model where the inputs are not pinned explicitly, so
'updating' them will actually increment their versions.

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

* Fixed requirements merge conflict

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

---------

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
2025-08-19 21:44:24 -04:00
Aiden Fox Ivey
1d6e213aa3
Add Classic McEliece sanitization patch (#2218)
* Add patches

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

* Add Classic McEliece sanitization patch

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

---------

Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
2025-08-18 10:04:23 -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
h2parson
9e964cad5b
Integrate SLH-DSA-C Library (#2175)
* copy from slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* integrate with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly list slhdsa files to include and push generated code

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format code script

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add to requirements.in

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix code conventions

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from upstream changes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add chdir to copy from slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify template

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* generate requirements.txt

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify requirments in workflows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* a

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* sort filenames in cmake file generation for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add newline at end of header file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace and fix alg info tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* update docs with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace to src files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* initialize ctx in slh

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly set little endian for windows x86

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily disable ctx signing for slh tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable kats until hashes available for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix issues in test sig mem

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily add namespaces so that slh dsa will not break test namespace

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* updates

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* formatted file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* align jinja template to astyle

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* change addrnd size

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* integrate with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly list slhdsa files to include and push generated code

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format code script

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add to requirements.in

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix code conventions

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from upstream changes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add chdir to copy from slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify template

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* generate requirements.txt

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify requirments in workflows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* a

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* sort filenames in cmake file generation for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add newline at end of header file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace and fix alg info tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* update docs with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace to src files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* initialize ctx in slh

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly set little endian for windows x86

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily disable ctx signing for slh tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable kats until hashes available for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix issues in test sig mem

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily add namespaces so that slh dsa will not break test namespace

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* updates

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* formatted file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* align jinja template to astyle

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* change addrnd size

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix std algs filtering issue

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modifying windows amd toolchain file to fix endianness issue

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable leak testing on slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable slh dsa for arm emulated linux and zephyr tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix zephyr test skip logic

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix upstream issue with prehash naming and add variant specific nist levels

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* automatically update slh dsa yml file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* get slh dsa md file generation working

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix naming in slh wrapper files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* minor changes from review

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate slh dsa jobs from stfl sigs

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate slhdsa from sig stfl tests on mac and windows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix macos yml format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify zephyr timeout

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* re-enable some tests for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate leak tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* allow algorithm family level enablement and reconfigure slhdsa CI jobs

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* move slh dsa address sanitizer to extended tests and extend time limit to 90 minutes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* remove package deb from CI job, remove auto gen kat sig for slhdsa, add prime ctx step for sig testing slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

---------

Signed-off-by: h2parson <h2parson@uwaterloo.ca>
2025-08-13 15:41:47 -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
Pablo Gutiérrez
d745d35938
Continuous Benchmarking using Github Actions (#2134)
* Added workflows and script for speed beanchmarking

Signed-off-by: Pablo Gutiérrez Félix <pablogf@uma.es>

* changed branch push to main

Signed-off-by: Pablo Gutiérrez Félix <pablogf@uma.es>

* Added SPDX-License-Identifer

Signed-off-by: Pablo Gutiérrez Félix <pablogf@uma.es>

* Fixed github security warnings

Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>

* Fixed github security warnings 2

Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>

* Fixes after commit-to-main tests

Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>

---------

Signed-off-by: Pablo Gutiérrez Félix <pablogf@uma.es>
Signed-off-by: Pablo Gutiérrez <pablogf@uma.es>
2025-06-11 09:38:44 -04:00
Matthias J. Kannwischer
4784356bd1
Update mlkem-native to v1.0.0 (#2146)
* Update mlkem-native to v1.0.0

This commit updates mlkem-native to the first stable release v1.0.0.

This also removes a patch that was needed for an older version of mlkem-native.
Resolves https://github.com/open-quantum-safe/liboqs/issues/2110

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* Skip failing CI test (#2157)

* Skip failing CI test

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

* Fix typo

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

---------

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

---------

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2025-06-05 08:59:49 -04:00
Jan Adriaan Leegwater
429c98ee7e
Integrate SNOVA into liboqs (#2109)
* Integrate SNOVA into liboqs

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Remove SNOVA_66_15_3

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Add ARM NEON

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Update, tighter constant_time passes and issues [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Update remote commit

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Review comments SWilson4 [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Fix newline at end of file [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Restrict zephyr algorithms to the low stack ones. [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Disable SNOVA_24_5_5 in zephyr test [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Fix typos in KAT [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

* Use Constant Time version for sign [full tests] [extended tests]

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>

---------

Signed-off-by: Jan Adriaan Leegwater <info@vacuas.nl>
2025-05-01 11:41:57 -04:00
Pravek Sharma
9c68f3d7e4
Change cupqc upstream repo (#2115)
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
2025-04-25 12:09:39 -04:00
Douglas Stebila
a7d698ca9c
Temporarily disable HQC (#2122)
* Temporarily disable HQC

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>

* Add logic to disable algorithms by default

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

---------

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2025-04-11 05:47:21 -04:00
Spencer Wilson
3ca1a36909
Add DeriveKeyPair API (#2070)
* Initial derive keypair commit

Signed-off-by: Eddy Kim <Eddy.M.Kim@outlook.com>
Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Add pqcrystals-ml_kem_ipd.patch

Signed-off-by: Eddy Kim <Eddy.M.Kim@outlook.com>
Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Fix encaps key in scheme and revert whitespace changes

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Hopefully corrected patch file

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Corrected missing derand in kem_scheme

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Fix indentation

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Run copy_from_upstream

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

derand testing tentative changes

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Add missing function declarations

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Add template for avx2 derand functions

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Run copy_from_upstream

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

WIP: Add changes for coin length

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>

Update patch to include coin lengths

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

Bootstrap

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

Conditional copy

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

Run copy_from_upstream

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

Separate coins variable into two distinct variables

Signed-off-by: Eddy Kim <Eddy.M.Kim@outlook.com>
Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

Add derand fixes

- Add support for BIKE, FrodoKEM, sntrup
- Add hooks for testing
- Add missing kem comment to documentation
- Don't run decaps() in test_kem_derand if encaps_derand() fails
- Add markdown documentation changes

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

WIP trying to fix build errors

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

Fix remaining build issues

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

Resolve unused parameter issues for BIKE

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

Resolve unused paramter issues for FrodoKEM

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

Fix whitespace inconsistency

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

Fix whitepace issue

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

Insert unused attributes

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

Void all unused parameters

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

Use tab instead of spaces in kem_scheme

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

Run copy_from_upstream

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

Fix kem_derand python tests

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

Initialize coins in test_kem_derand

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

* Update patch to work with mlkem-native

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

* Update docs generation and templating

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

* Run copy_from_upstream [full tests] [extended tests]

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

* Don't call randombytes on zero-length arrays

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

* Run format script

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

* Remove encaps_derand support

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

* Run copy_from_upstream

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

* Skip encaps/decaps in test_kem_derand

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

* Refactor test code

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

* s/coins/seed/g

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

* Improve output

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

* Improve formatting [full tests] [extended tests]

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

---------

Signed-off-by: Eddy Kim <e84kim@uwaterloo.ca>
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
Co-authored-by: Eddy Kim <Eddy.M.Kim@outlook.com>
2025-03-18 14:40:07 -04:00
Marco Gianvecchio
8ee6039c74
Add bitflip test for trivial SUF-CMA forgeries (#2090)
* add bitflip test to test_sig.c
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* format code
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* - add sig->suf_cma
- add command-line argument to test_sig.c (the number of bitflips)
- update CROSS upstream to SUF-CMA
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* %d to %ld for size_t bitflips

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* cast argument bitflips to size_t
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* replace atoi() with strtol()
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* cast bit_index to %llu

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* update bitflip tests:
- revert CROSS to EUF-CMA
- add test_bitflip_message
- exclude stateful signatures for now
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* remove bitflips_as_str in printf
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* test_bitflip as a single function, add support for stateful signatures
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* add OQS_TEST_CT_DECLASSIFY after test_bitflip_stfl
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* [extended tests]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* more OQS_TEST_CT_DECLASSIFY [extended tests]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* patch dilithium to add suf-cma
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* run copy_from_upstream.py
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* SUF-CMA in dilithium docs, run copy_from_upstream.py
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* correct sizeof in OQS_randombytes call (thank you @SWilson4!)
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* factor bitflip testing functions out into test_helpers.c
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* --allow-multiple-definition for Windows .dll in test_kem_mem
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* --allow-multiple-definition for Windows .dll in test_sig and test_sig_stfl
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

---------

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
2025-03-14 11:53:05 -04:00
Matthias J. Kannwischer
8ed50816c1
Add UOV (#2094)
* update_docs_from_yaml.py: Do not rely on SPHINCS being last

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* allow pqov namespace

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* add uov implementations [full tests] [extended tests]

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* Typo [skip ci]

Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>

* add UOV to NIST_SIG_ONRAMP

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

---------

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Douglas Stebila <dstebila@users.noreply.github.com>
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
Co-authored-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Basil Hess <bhe@zurich.ibm.com>
2025-03-10 10:33:27 -04:00
Spencer Wilson
526506f67a
Add references to security response process (#2077)
* Add link to security response process [skip ci]

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

* Add security support info to PLATFORMS.md [skip ci]

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

* Add SECURITY.md to Doxyfile

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

* Fix links for Doxygen

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

---------

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2025-03-07 17:40:57 -05:00
Matthias J. Kannwischer
726400dfe6
Update mlkem-native to v1.0.0-beta (#2092)
* remove pqcrystals ml-kem patch that is no longer needed

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

* Update mlkem-native to v1.0.0-beta [full tests] [extended tests]

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>

---------

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
2025-03-07 13:43:02 -05:00
Basil Hess
fa5f792906
Update MAYO to NIST round 2 (#2095)
* Update MAYO to NIST round 2 [full tests] [extended tests] [trigger downstream]

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

* Update mayo yml with neon

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

---------

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2025-03-07 18:31:41 +01:00
Marco Gianvecchio
77917043c4
Update CROSS to version 2.0 (#2078)
* Update CROSS to version 2.0
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* implementations-switch-on-runtime-cpu-features: false in CROSS [skip ci]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* update KAT "all" for CROSS [extended tests]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* update cross.md [extended tests]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* correct call stack in the suppression file for CROSS [extended tests]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

---------

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
2025-02-20 07:51:12 +01:00
Basil Hess
a554b36dd3
Import ML-KEM from mlkem-native/PQ code package (#2041)
* Integrate ML-KEM from mlkem-native [full tests] [extended tests]

---------

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2025-02-04 16:26:27 +01: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
dependabot[bot]
cc61cb046d
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>
2025-01-08 21:28:46 -05:00
Spencer Wilson
af78b87869
Update PQClean commit and delete patch for HQC (#2026)
* 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>
2024-12-22 00:34:13 -05:00
Basil Hess
d9c214cc64
Add ML-DSA / FIPS 204 final (#1919)
* 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>
2024-11-26 13:45:10 +01:00
Spencer Wilson
25206cdcb8
Set ML-KEM alg_version to "FIPS203" (#1997)
* 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>
2024-11-26 04:24:48 -05:00
Spencer Wilson
95f904bcaa Add patch to fix HQC decapsulation
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2024-11-21 05:50:03 -08:00
Marco Gianvecchio
1dfb70bca8
imported fix from CROSS upstream: endianness-aware csprng (#1983)
* Revert "Disable erroring TravisCI build"

This reverts commit b59d78c0f02455da91ce8a34fa742c2b063ccddd.

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

* disable cross on s390x

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

* remove status badge

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

* imported fix from CROSS upstream: endianness-aware csprng

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* reenable cross on s390x
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* fix more endianness issues, add file creation to copy_from_upstream.py
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* revert: add file creation to copy_from_upstream.py
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

---------

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
Co-authored-by: Basil Hess <bhe@zurich.ibm.com>
2024-11-11 13:14:40 -05:00
Spencer Wilson
f7f6af0895
Remove SPHINCS+ aarch64 code (#1972)
* 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>
2024-11-04 16:55:30 -05:00
Marc Stevens
90030a4ae4
Add benchmarking for stateful hash based schemes: speed_sig_stfl (#1952)
* 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>
2024-10-22 09:16:56 -04:00
songlingatpan
1d92135e80
[#1823] replace malloc/calloc/strdup/free with openssl allocator (#1926)
* [#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>
2024-10-19 07:21:51 +02:00
Basil Hess
329869f559
Update CBOM format to upstream v1.6 (#1834)
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2024-10-03 14:37:24 +02:00
Pravek Sharma
306140ebb5
Patch Kyber to fix ASAN error on ARM64 (#1922)
* Update oldpqclean kyber patches.

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

* Run copy_from_upstream.py

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

* Add co-authors. [skip ci]

Co-Authored-By: Kyle Nekritz <knekritz@meta.com>
Co-Authored-By: Mingtao Yang <mingtao@meta.com>
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>

---------

Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
Co-authored-by: Kyle Nekritz <knekritz@meta.com>
Co-authored-by: Mingtao Yang <mingtao@meta.com>
2024-09-13 12:10:17 -04:00
Spencer Wilson
b37c937a64
Refactor liboqs CI and update Ubuntu images (#1909)
* Refactor liboqs CI to utilize reusable workflows
* Add CI.md documentation file
* Update all Focal jobs to Noble (the latest Ubuntu LTS)
* Minor fixes to address issues related to the update (CT files / syntax / static analysis)

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
2024-09-09 10:43:59 -04:00
Marco Gianvecchio
d93a431aaf
Add CROSS (#1881)
* add CROSS upstream

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* add KATs

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* add docs

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* add Zephyr config

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* run copy_from_upstream.py

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* fix: counter i in generate_merkle_proof shadows previous declaration

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* "claimed-security" is BUFF (instead of EUF-CMA)

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* add CROSS to NIST_SIG_ONRAMP

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* "claimed-security" is set to EUF-CMA by liboqs

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* don't use threads for CROSS variants with large stack usage

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* int defines in api.h don't need to be "L"

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* added auxiliary-submitters

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* fixed indentation
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* disabled variants with large stack usage in zephyr

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* added contributors
[trigger downstream]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* updated codeowners and contributors
[trigger downstream]
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

* moved test from ubuntu-focal-clang15 to ubuntu-jammy-clang14
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>

---------

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
Co-authored-by: Pravek Sharma <sharmapravek@gmail.com>
2024-09-03 15:45:37 -04:00