275 Commits

Author SHA1 Message Date
Pravek Sharma
348ab36bbe
Update Classic McEliece supression files (#1527)
* Update constant suppression supression files for Round 4 Classic McEliece.

* Update constant suppression supression files for Round 4 Classic McEliece.
2023-08-15 10:48:54 -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
Douglas Stebila
b2ad3f97c3
Fix SPHINCS+ constant-time suppression files (#1480)
* Update SPHINCS+ AVX2 suppression files

* FIx names of SPHINCS+ algs in constant_time passes

* More SPHINCS+ suppressiosn

* SPHINCS SHAKE suppressions.

* Changed suppression annotations.

* Uncommented file name annotations.

---------

Co-authored-by: xvzcf <xvzcf@users.noreply.github.com>
2023-06-06 20:21:25 -04:00
Douglas Stebila
3e25479c16
Don't use cycle counter on ARM32 (#1485) 2023-05-31 20:02:45 -04:00
Douglas Stebila
e11e2d1048
Extend test_hash to cover more input lengths (#1468) 2023-05-18 13:00:39 -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
35b1bf2704
Remove remaining references to SPHINCS+-Haraka, Kyber 90s, Dilithium-AES (#1465)
* Delete Haraka references

* Delete Kyber90s and Dilithium-AES source code and references

* Delete more references to Dilithium-AES
2023-05-16 12:27:12 -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
Michael Baentsch
24c7f4f078
Fixing OpenSSL SHA2 incremental API integration (#1454)
* disable OpenSSL if neither AES, SHA2, or SHA3 are OSSL-provided

* Fixes faulty OpenSSL incremental SHA2 API integration

* guard OpenSSL3 initialization

* initialize all OSSL3 statics if OQS_USE_OPENSSL=ON
2023-05-15 17:17:37 +02:00
Dmitry Belyavskiy
871f9e26d1
Initial fetching of MD and Cipher objects from OpenSSL(3) (#1431)
* Strawman version of one-time fetching MD objects from OpenSSL

We need init them and free them in one place to avoid threading
issues.

* Moving initialization of OpenSSL objects to a separate file

* Call OQS_init to ensure OpenSSL methods are cached

* Fix typo

* Use prefetch OpenSSL cipher object in rand_nist

---------

Co-authored-by: Douglas Stebila <beldmit@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-04-25 12:19:42 -04:00
dkostic
8b24019ba0
Make BIKE decode function void to avoid ct issues (#1400)
* Make decode function void to avoid ct issues

* Update test documentation

* add suppression files

* forgot to add the file

* typo fix

* Compute threshold without floating point operations

* Replace division by a constant with mul+shift

---------

Co-authored-by: dkostic <dkostic@amazon.com>
2023-04-14 14:46:14 -04:00
Douglas Stebila
d61d81c526
Add constant time suppression for Falcon AVX2 (#1415) 2023-03-09 10:43:07 -05:00
Basil Hess
4c7ced218a
Copy_from_upstream: no subprocess call & update_cbom fix for CI. (#1412)
* Refactor update_cbom and update_docs_from_yaml, allow copy_from_upstream to import them.
Workaround for issue in GitPython, caused update_cbom to fail in Github CI.

* updates after copy_from_upstream
2023-03-06 09:54:43 -05: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
Michael Baentsch
1f62f66a47
correct free in test_kem/sig (#1399)
* correct free in test_kem/sig

* code simplification
2023-02-23 17:24:40 +01:00
Michael Baentsch
20fadb89ef
Add full-cycle speed test (#1391)
* adding true repetitive full-cycle testing

* fix mem leak in speed testing
2023-02-17 10:06:51 +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
dkostic
a1bdce9894
BIKE Round-4 update (#1369)
* BIKE Round-4 update

* Export BIKE symbols

---------

Co-authored-by: dkostic <dkostic@amazon.com>
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2023-02-08 06:54:30 +01:00
Goutam Tamvada
924ea88cb0
Updated PQClean commit in copy_from_upstream.yml (#1359) 2023-01-16 11:06:08 -05: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
f272232c86
Build dump_alg_info in tests (#1353)
Fixes #1334
2023-01-12 13:03:08 -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
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
Mark Albert
d577d0b4e9
add valgrind option (#1327) 2022-12-07 07:26:46 +01: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
fac5a818ed
Removed the Picnic signature scheme. (#1323) 2022-11-28 15:29:10 -05:00
Goutam Tamvada
203c9c269b
Removed the rainbow signature scheme (#1321). 2022-11-28 11:34:59 -05:00
Michael Baentsch
e9cd9a5c55
automatically activate USE_RASPBERRY_PI define (#1313)
* automatically activate USE_RASPERRY_PI define

* prefix RASPBERRY_PI define with OQS_
2022-11-18 08:12:19 +01:00
Jason Goertzen
c520cdb871
Fixing OQS ARM inconsistencies (#1307)
* Renamed sha2 C_OR_NI to C_OR_ARM since we only select between C and ARM

* Updated AES C_OR_NI_OR_ARM's formatting and logic

* Renamed sha2_ni.c to sha2_armv8.c and updated CMakeLists.txt to fix build issues with arm optimized AES linking

* Fixed a feature detection logic issue

* Found an issue when compiling a distributed version

* Only apply -march=armv8-a+crypto to arm builds

* updated some naming
2022-11-15 16:47:36 -05:00
Michael Baentsch
222374e067
addressing sig length questions (#1306)
* addressing sig length questions

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2022-09-15 06:49:03 +02:00
thb@sb
c5b8cfe478
Solve '-Wstrict-prototypes' for clang >= 15.0 (#1293)
* Solve '-Wstrict-prototypes'

Manual changes are applied to the following algorithms only:

 * Bike
 * Frodo
 * Picnic

* Add prototype for implementation of `OQS_SIG_alg_count`

* Add prototype for implementation of `OQS_KEM_alg_count`

* Run `copy_from_upstream.py`

Now, the constructors have a full prototype. It compiles with clang 16.0
2022-08-30 11:20:05 +02:00
Sebastian Ramacher
542b2d0b6b
Cover SHA3/SHAKE-implementation specific code paths in Picnic suppression files (#1286) 2022-08-10 10:06:31 -04:00
Sebastian Ramacher
0511af68d7
Update to Picnic 3.0.17 (#1280)
* Update to Picnic 3.0.17

* Added valgrind constant time execptions for picnic

Co-authored-by: Christian Paquin <cpaquin@microsoft.com>
2022-08-08 17:02:00 +02:00
Douglas Stebila
42f36c2a1b
Add option to all pytests to skip particular algorithms (#1282)
* Add SKIP_ALGS option to all pytests to skip particular algorithms
2022-08-07 06:36:45 +02:00
Michael Baentsch
84fde26ed2
Fixup dilithium-avx2 valgrind test file (#1283) 2022-08-06 17:43:24 -04:00
Michael Baentsch
91bfca9bdd
Add library version retrieval function (#1273) 2022-08-03 13:32:11 -04:00
Douglas Stebila
1e47e14556
Remove SIDH and SIKE (#1272)
Due to https://eprint.iacr.org/2022/975.

Fixes #1268.
2022-08-03 10:19:28 -04:00
Douglas Stebila
478ccba970
Remove Rainbow level 1 (#1263)
Fixes #1260
2022-07-27 15:12:16 -04:00
HY Chang(splasky)
664c6f331d
Fix memory leak detected by valgrind (#1250) 2022-07-17 15:35:35 -04:00
Michael Baentsch
a8dad8d305
adding memory leak testing (#1234)
* adding memory leak testing for x86_64 on ubuntu

* document test exclusion of Classic-McEliece-8192128
2022-07-01 09:09:03 +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
e37ad5b5d8
Added typecasts to ds benchmark to make clang happy (#1225) 2022-06-14 06:31:29 +02:00
Ted Eaton
feea2f3864
Issues and passes for aarch64 const time checks (#1214) 2022-05-25 10:47:34 -04:00
Douglas Stebila
fc7d89c074
Deal with some issues identified by clang scan-build (#1211)
* Fix memory leak detected by scan-build

* Remove unused statement (identified via clang scan-build)
2022-05-14 06:20:25 +02:00
Michael Baentsch
e858c7a642
skip yamllint test for good (#1196)
* skip yamllint test for good

* remove yamllint completely
2022-03-22 10:13:07 -04:00