60 Commits

Author SHA1 Message Date
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
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
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
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
Basil Hess
dc4deaa4e1
Add ML-KEM / FIPS203 final (#1899)
* Add ML-KEM
* Add ACVP vectors for ML-KEM
* Removes ML-KEM-ipd

---------
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2024-08-27 18:57:04 +02: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
Basil Hess
982c762c24 Pull Kyber/ML-KEM CT-Fix from upstream
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2024-06-05 12:02:05 +02:00
Spencer Wilson
7e5dbaf2e8
Support Falcon PADDED format (#1710)
Additionally:
- re-enable Falcon-1024 in weekly KAT tests
- Update Falcon licence documentation
- Update deprecated CircleCI image
2024-03-06 12:02:43 -05:00
Basil Hess
60adf53107
Add ML-DSA-ipd and ML-KEM-ipd & NIST supplied test vectors (#1626)
Pulls ML-DSA-ipd and ML-KEM-ipd
Adds test cases with NIST supplied test vectors for ML-DSA/ML-KEM
Adds aliases (ML-<name> are aliases of ML-<name>-ipd)
[trigger downstream]
2024-02-19 10:28:28 +01:00
Spencer Wilson
0e0c2cfb18 Update to most recent Kyber commit 2024-01-08 11:51:01 -05:00
Pravek Sharma
e33e7614f9 Update copy_from_upstream.py 2024-01-08 11:51:01 -05:00
Basil Hess
6982f4c28f
Adds patch to aarch64 Kyber pulled from PQClean for variable-time division in poly_tomsg. (#1636) 2023-12-26 12:12:07 +01:00
Basil Hess
0febc30848
pull kyber from upstream: dda29cc63af721981ee2c831cf00822e69be3220 (#1631) 2023-12-15 19:41:51 +01:00
Spencer Wilson
aeac3a441d
Pull new HQC implementation from upstream (#1585)
* Update Sphincs+ PQClean patch

* Don't apply PQClean Dilithium and Kyber patches

* Run copy_from_upstream; don't apply Dilithium and Kyber changes

* Run HQC KATs with custom PRNG

* Satisfy astyle

* Add licence for common code

* Fix CI build errors

* Update HQC version, OQS version, and SOVERSION

* Move HQC PRNG into test file

* Satisfy astyle

* Fix SHA3 link error

* Reset HQC issues/passes

* fixup! Fix SHA3 link error

* fix kat_kem linkage to make HQC PR pass CI (#1601)

* fix kat_kem linkage

* remove armhf CI support

* Revert "remove armhf CI support"

This reverts commit af759bbf743bb3ecc2e7315cf10c1785e93bcc05.

---------

Co-authored-by: Michael Baentsch <57787676+baentsch@users.noreply.github.com>
2023-11-06 16:40:50 -05:00
Michael Baentsch
02da5677ea
enable several pqclean upstreams (#1595) 2023-10-30 16:43:10 +01:00
Spencer Wilson
f761b06c3d
Pull Neon implementation of Falcon from PQClean (#1547)
Pull aarch64 implementation of Falcon from PQClean

---------

Co-authored-by: Duc Nguyen <ductri.nguyen@sandboxquantum.com>
2023-09-13 08:59:11 -04:00
Douglas Stebila
d14825a755
Pull Falcon updates from PQClean (#1523)
c3abebf4ab
2023-08-10 13:43:23 -04:00
Basil Hess
be678118a5
kyber/dilithium aarch64 pull from pqclean + patches (#1512)
* fix compiler warning/error in aes256_armv8.c

* pull pqclean+paches

* pull pqclean+paches

* remove old patches & update algorithm md/yml

* add new patches

* add patch with fixes for arm/kyber768+kyber1024

* update licenses in yamls and mds

* update kyber/dil suppression files

* removes superfluous pqclean Makefiles & updates copy_from_upstream script to handle this case

* update license infos
2023-08-04 16:52:49 -04:00
Pravek Sharma
0b64ca3c91
Update Classic McEliece (#1470)
* Update Classic McEliece

* Run copy_from_upstream.py

* Change crypto_declassify.h license

* Remove old McEliece vec/avx directories

* Add add_compile_options(-Wno-language-extension-token) to comipler_opts.cmake

* Fix CI errors. Reduce McEliece optimisation from -03 to -01. Patch PQClean McEliece.

* Update liboqs version number. Fix comments.

* Increment SOVERSION.

* Update Classic McEliece advisories. Replace

* Update Classic McEliece documentation YAML. Update KEM CMakeLists Jinja template.
2023-07-17 09:43:45 -04:00
Goutam Tamvada
4d10a58abc
Renamed sphincs-sha256-X to sphincs-sha2-X and sphincs-shake256-X to sphincs-shake-X. (#1467)
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-05-17 13:12:03 -04:00
Douglas Stebila
fd1b89724a
Update SPHINCS+ (#1420)
* Switch to new PQClean commit for SPHINCS+ and remove old patch file

* Improve "compilability" on Apple M1 (ARM) (#1421)

* correct ARM SHA3 extension addition

* correct compile option for ARM SHA

* correct SHA3 enablement

* Remove SPHINCS+ robust and Haraka variants

* Fix SHA2 block sizes in OpenSSL wrapper

* enable Keccak for Sphincs even if OpenSSL shall provide SHA3

* properly handle xkcp enablement if only specific algorithms are selected

* correct conditional setting

* re-enable XKCP for other platforms

* Windows support

* alternate pqcrystals-AES removal

---------

Co-authored-by: Michael Baentsch <57787676+baentsch@users.noreply.github.com>
2023-05-16 10:54:28 -04:00
Thom Wiggers
ec5c3be1ca
Update Falcon implementation (#1395)
* Update Falcon implementation

* Update license and upstream documentation

* Update Falcon constant-time suppressions

* Whitespace tweak from linter [skip ci]

* Update Falcon spec version [skip ci]

---------

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-03-01 11:03:38 -05:00
Basil Hess
341cf22427
Copy from upstream (Kyber), add pqcrystals-* licenses to README (#1403)
* Copy from upstream (Kyber), add pqcrystals-* licenses to README

* update algorithm docs
2023-02-25 08:20:41 +01:00
Michael Baentsch
f96d9c2fff
Revert "Update Falcon to 20230207 (PQClean commit 96dfee95cc56207d1ec5e3a2df306d6614ad7c6c) (#1386)" (#1392)
This reverts commit 40b01fdbb270f8614fde30e65d30e9da18c02393.
2023-02-17 07:43:26 +01:00
Douglas Stebila
40b01fdbb2
Update Falcon to 20230207 (PQClean commit 96dfee95cc56207d1ec5e3a2df306d6614ad7c6c) (#1386)
Fixes #1315
2023-02-10 10:58:42 -05:00
Goutam Tamvada
924ea88cb0
Updated PQClean commit in copy_from_upstream.yml (#1359) 2023-01-16 11:06:08 -05:00
Jeevesh Rishi Dindyal (Sarvesh)
2e42595804
Add ntruprime (#1328)
* Add back sntrup761
2022-12-22 07:37:44 +01:00
Goutam Tamvada
a7e1b8a32f
Removed NTRU. (#1335) 2022-12-15 12:19:29 -05:00
Goutam Tamvada
f5d96cab5c
Removed SABER. (#1326) 2022-12-01 14:04:08 -05:00
Goutam Tamvada
c50d38e5a8
Removed NTRU-Prime. (#1325) 2022-11-29 07:31:53 +01:00
Goutam Tamvada
203c9c269b
Removed the rainbow signature scheme (#1321). 2022-11-28 11:34:59 -05:00
Basil Hess
2e2ddb4e04
Update Kyber and Dilithium from upstream (#1316) 2022-11-23 15:15:27 -05:00
Douglas Stebila
478ccba970
Remove Rainbow level 1 (#1263)
Fixes #1260
2022-07-27 15:12:16 -04:00
Basil Hess
e88cc366b5
Sync Kyber with upstream, enable Scan-Build with Kyber (#1252) 2022-07-11 11:53:20 +02: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
Jason Goertzen
55bc8cb38d
ARMv8 optimized Dilithium (#1194)
* Updated sig templates to add support for arch specific upstreams. Currently behaves as expected, but still need to test (and integrate) dilithium

* Fixed a couple of build errors, and started work on dilithium integration from pqclean. Currently failing kat tests

* Updated templating for both sig and kem to make them look a little better

* Renamed dilithium folders so they are consistent across pqclean and pqcrystals so that copy_from_upstream script will function correctly

* Added arm optimized version of dilithium[2|3|5]

* Updating other signature schemes CMakeLists.txt to be the output of the updated templates

* Arm optimized implementation of dilithium is added, with randomized signing patched into it. copy_from_upstream script is working properly. Still need to update the update_docs scripts before ready to merge

* Finished updating docs scripts and yml files. Builds pass, so should be ready for a merge

* Fixed template issue with multiple compile flags

* Updated doc generation scripts so that all '_' in scheme names are replaced with '\_'
2022-03-09 15:17:42 -05:00
Jason Goertzen
4ec538e3c8
Fixed build issue on arm based macs when using gcc11 (#1177)
* Fixed a build issue when trying to use gcc11 on an arm based mac. Also updated kem templates so that any pqclean scheme that has a similar problem in the future can be fixed by just patching the assembly files

* adding M1 CI for gcc-11

Co-authored-by: Michael <57787676+baentsch@users.noreply.github.com>
2022-01-20 10:27:46 -05:00
Jason Goertzen
71b570c59c
Adding arm64_v8 optimized versions of saber. (#1131)
* Added aarch64 optimized version of saber, lightsaber, and firesaber from pqclean

* Updated to latest commit of pqclean which fixes saber aarch64.

* Updated saber docs as per @dstebila's comment

* Removed duplicate lines from README.md

* Fixed local issue for duplicate lines in README.md. This is the output of the update docs script after fixing my local issue
2021-11-27 15:24:05 -05:00
Douglas Stebila
14d64d379d
Fix gcc 11 error for Kyber on arm64 (#1127)
* Set new version of Kyber ARM to use from PQClean

* Result of running copy_from_upstream

* Removed the need for pqclean aarch64 patches

* Updating doc generation to be a little more careful about when required flags is an empty list

Co-authored-by: Jason Goertzen <Martyrshot@gmail.com>
2021-11-19 16:40:04 -05:00
Michael Baentsch
2c98b97fa4
adding ntruhps40961229 ntruhrss1373
clean code only added (https://github.com/PQClean/PQClean/pull/427)
2021-11-19 06:43:43 +01:00
Jason Goertzen
769412623c
Adding multiple upstream support to doc generation (#1123)
* Fix an issue where run_tests tried to run tests from upstream. Fix by @DStebila

* No longer checking spdx on files copied from upstream

* Added compiler checking for gcc. Must be at least 9.4.0.

* Added pqclean's aarch64 optimized kyber implementation to liboqs

* stripping asimd flag for ARM64_V8 as it isn't needed and will cause errors when trying to specify it during compilation

* Updated kyber docs

* Updated kyber markdown so that no-secret-dependent-branching-checked-by-valgrind correctly says false for the new aarch64 implementation

* Added automated updating of legacy yaml format, and added some yaml files which don't get automatically updated

* Fixed a bug where optimized upstreams would use the primary upstream's supported platform

* Fixed a bug with copy_from_upstream.py's verify function where it would always use the default upstream location when comparing with diff

* Added reporting for implementations that are in upstream but aren't yet integrated into liboqs

* Added support to ignore implementations from upstream in copy_from_upstream.yml. This is to prevent implementations that haven't been integrated into LIBOQS yet from being pulled in by copy_from_upstream.py. It also silences the warning when verifying.

* Adding updated ymls and md files for docs

* copy_from_upstream.py now also calls update_docs_from_yaml.py
2021-11-18 06:56:19 +01:00
Jason Goertzen
0807ecf9af
Adding support for multiple upstream to copy_from_upstream, as well as pqclean's aarch64 kyber implementation (#1117)
* currently there is a bug where pytest doesn't work but the individual tests work... looking into it still.

* Fix an issue where run_tests tried to run tests from upstream. Fix by @DStebila

* No longer checking spdx on files copied from upstream

* pqclean's aarch64 kyber implementation is now being pulled from. Still need to clean things up.

* pqclean kyber fragment was left behind. It's now added

* Added compiler checking for gcc. Must be at least 9.4.0. Need to track down clang and appleclang

* Need to figure out how to handle commen dependencies from multiple upstreams

* Cleaned up copy_from_upstream.py a bit

* Added pqclean's aarch64 optimized kyber implementation to liboqs

* Added pqclean's aarch64 optimized kyber implementation to liboqs

* Fixed an isssue where 'empty' conditionals were added to kem_scheme.c files when there were no required flags

* reverting sabre to version prior to updated copy_from_upstream script

* stripping asimd flag for ARM64_V8 as it isn't needed and will cause errors when trying to specify it during compilation

* Fixed an issue where empty conditionals would appear when no required flags were specified

* Updated kyber docs

* Updated kyber docs with better formatting

* Adding updated kyber documentation

* Reverting documentation that was erroniously updated while updating kyber.

* Reverted ntruprime too far back by mistake

* Updated kyber doc's yml no-secret-dependent-branching-checked-by-valgrind to false

* Updated kyber markdown so that no-secret-dependent-branching-checked-by-valgrind correctly says false for the new aarch64 implementation
2021-11-10 14:22:49 -05:00
Michael Baentsch
6175da8246
Add S/NTRUP1277 (#1111)
* adds S/NTRUP1277

* disable McEliece for OSX shared CCI runs

* known sntrup constant_time issue suppressed
2021-10-22 09:31:47 -04:00
Douglas Stebila
36d8a49c88
Update to PQClean commit 5b8ef3baea3ffdfbf688a3a1bb8f02de44a67ec0 (#1097)
* Update to PQClean commit 5b8ef3baea3ffdfbf688a3a1bb8f02de44a67ec0

* executed python3 scripts/update_docs_from_yaml.py

Co-authored-by: Michael <57787676+baentsch@users.noreply.github.com>
2021-10-01 12:31:31 -04:00
Basil Hess
75b648e9f6
Kyber/Dilithium copy_from_upstream (#1088)
* Kyber/Dilithium copy_from_upstream

* Updated algorithm docs
2021-09-13 21:07:25 +02:00
Douglas Stebila
30fbfd826f
Sync with PQClean (#1061)
* Sync with PQClean 6c1ea921ee4a06a6b50c742ca540bb9b5e51aee2

* Update documentation YML from PQClean

* Update documentation from PQClean
2021-08-01 17:02:22 -04:00
Michael Baentsch
a822f0e62d
PQClean / NTRU Prime update (#1039)
* updating upstream algorithms

* update Kyber upstream ref

* adding compat.h

* add SPDX

* move to PQClean shims

* alpine-breaking gcc feature check changed

* remove error case as per PR review comment
2021-06-29 15:05:34 -04:00