364 Commits

Author SHA1 Message Date
Douglas Stebila
46693cf93a
Add NTRU-Prime from PQClean (#848) 2020-11-03 13:36:24 -05:00
Douglas Stebila
1a923c79e0
Sync with PQClean (#846)
* Change BMI1 and add PCLMUL

* Copy from PQClean

Commit b4078aae55f9efbc7b3ab7b3c702be376f7a7987, excluding HQC

* Update algorithm datasheets

* Prettyprint

* Update version to 0.5.0-dev
2020-10-29 19:46:39 -04:00
Christian Paquin
7c0aa19e8c
Upgraded picnic to v3.0.3. (#838)
* Upgraded picnic to v3.0.2.

* Fix explicit_bzero function.

* Fixed redefinition of AddByte on little endian platforms (picnic's and oqs's namespacing)

* Update picnic to v3.0.3

* Fixing some picnic functions namespacing

* Added namespacing for picnic function on little endian system.

* More picnic namespacing fixes

* More picnic namespacing fixes, round 2

* Added more namespacing prefix

* More picnic namespacing

* Explicit namespacing for KeccakP1600times4_StaticInitialize function
2020-10-22 10:31:51 -04:00
Michael Baentsch
e1dd9f72c4
correct compile time feature display (#837)
correct compile time feature display
2020-10-06 05:59:08 +02:00
Goutam Tamvada
3f89b987c7
Refactored CI. (#829) 2020-09-24 11:16:23 -04:00
Douglas Stebila
fab14cd090
Doxygen updates (#822)
* Doxygen updates

* Disable parallel tests in some cases

* Fix case sensitivity
2020-09-08 20:56:21 -04:00
Michael Baentsch
8476c10fad
addressing #802 (#823)
* addressing #802

* cmake API adaptation

* style fixes

* Limit CCI Win testing

* removed n/a features
2020-09-08 09:28:21 -04:00
Douglas Stebila
226b4637d9
Remove non-Round 3 algorithms (NewHope, ThreeBears, MQDSS, qTesla) (#810) 2020-08-17 13:25:08 -04:00
Douglas Stebila
adac989932
Added HQC from PQClean. (#805) 2020-08-04 13:22:45 -04:00
Douglas Stebila
aa7f1dfa3d
Cleanup PQClean implementations (#803)
* Sync with PQClean commit 90630db2ebada4bacceb5331b0a1a9a356ba65b9

* Delete duplicate implementations due to underscore bug; add MQDSS AVX2

* Delete more duplicate PQClean implementations
2020-08-04 11:54:25 -04:00
Douglas Stebila
ed1baf3d27 Change to 0.4.0-dev and some cleanup 2020-07-24 20:38:46 -04:00
Douglas Stebila
34ec4b83a7
Re-add AES-NI with CPU feature detection (#770)
* Start re-adding AES-NI with CPU feature detection

* Follow Goutam's feedback on CPU feature detection

* Macrify CPU feature detection logic in AES

* AES128 and AES256 using NI based on Romain Dolbeau's public domain code

* Fewer calls to C_OR_NI

* Restricting setting of OQS_USE_CPU_EXTENSIONS.

* Unroll AES loops

Co-authored-by: xvzcf <xvzcf@users.noreply.github.com>
2020-07-24 13:53:14 -04:00
Douglas Stebila
a55b12eb25
Fix non-Dilithium-related execute failures on Alpine (#796)
* Increase stack size when using musl libc on Alpine

This is probably not the best way to do it in long run, but I'm not sure 
how to detect libc version at compile time.

* Fix free-check bug on Alpine

* Extra symbols in shared library on Alpine

* Activate Alpine builds

* Only increase stack size if musl is present on Alpine

This is not the most generic way to do it but hopefully will suffice

* Temporarily enable Alpine builds

* Simplify link option on Alpine
2020-07-24 09:18:19 -04:00
Michael Baentsch
2991696b4c
upstream dilithium (#794)
* added upstream dilithium

* switched to clang on Centos-8
2020-07-23 06:45:08 +02:00
Christian Paquin
a34fd7062f formatted 2020-07-13 12:03:17 -04:00
Christian Paquin
0cba778097 Added invalid ciphertext test in test_kem, and replaced invalid signature with random array vs modified first byte (code from PR787). 2020-07-13 11:57:36 -04:00
Michael Baentsch
5f277fc019
KAT testing using hashes (#784)
* removed full-size KATs

* corrected qTesla avx2 KAT selection

* Fixed macOS build warnings. (#782)

* removed full-size KATs

* corrected qTesla avx2 KAT selection

* KATs as dicts; simplified & corrected logic
2020-07-08 10:40:50 -04:00
Michael Baentsch
f602c24401
fixed shlib OSX namespace test; moved alpine to nightly (#783)
* fixed shlib OSX namespace test; moved alpine to nightly

* disabled alpine
2020-07-08 10:37:57 -04:00
Christian Paquin
0327ed9169
Merge pull request #771 from christianpaquin/cp-picnicv3
Integrated picnic v3.0
2020-07-06 11:54:25 -04:00
Ryan Deschamps
1b9aecc656
Change return value of USING_TIME_RATHER_THAN_CYCLES to unsigned int. (#777) 2020-07-06 10:51:09 -04:00
Christian Paquin
f4d4d47c81 Integrated picnic v3.0. 2020-06-24 20:18:39 -04:00
Christian Paquin
5a3b238139 Upgraded SIKE to v3.3. 2020-06-19 14:03:37 -04:00
Nikita Karpey
1b1eaf20b5
Fixing test behavior (#754) 2020-05-19 09:35:58 -04:00
Douglas Stebila
6e0b0d79a9
Add SPDX-License-Identifier headers (#749)
* Add SPDX-License-Identifier in src/common

* Add SPDX-License-Identifier in FrodoKEM

* Add SPDX-License-Identifier in SIKE

* Add SPDX-License-Identifier in BIKE

* Add SPDX-License-Identifier in OQS headers

* Add SPDX-License-Identifier in files generated during copy-from-pqclean

* Add SPDX-License-Identifier in Picnic

* Add SPDX-License-Identifier in qTesla

* Add SPDX-License-Identifier in CMake files

* Update license info in README

* Add SPDX-License-Identifier in scripts

* Add SPDX-License-Info to CMakeLists

* Add SPDX-License-Info in tests

* Add SPDX-License-Info to various files

* Prettyprint

* Add test for SPDX-License-Identifier headers

* Updated license identifiers for CPU extension detection code.

* Use conjunction for SPDX in file with two licenses

Co-authored-by: xvzcf <xvzcf@users.noreply.github.com>
2020-05-12 11:45:37 -04:00
xvzcf
90798f9dc1
Fixes for issues 732 and 738 (#743)
* Removed parallelism from ubuntu-bionic-x86_64-asan CircleCI workflow.

* Modified Picnic CMakeLists.txt to forgo optimizations if Clang is the compiler.
2020-05-05 21:51:56 -04:00
Thom Wiggers
2dae6ea120
Update MQDSS to v2.1 (#725) 2020-04-24 14:24:36 -04:00
xvzcf
faa7589e6f
Refactoring (#730)
* Refactored build and templating scripts.

* Added check for OQS_PORTABLE_BUILD to Frodo.

* Removed security_strength parameter from OQS_randombytes_nist_kat_init.
2020-04-23 15:34:36 -04:00
xvzcf
8950275409
Removed non-standard CMake build types and fixed other bugs. (#726)
* Removed non-standard CMake build types and introduced new variables to customize the build.

* Added handling for new build variables to all KEMS and signatures and updated CI.

* Added clang-9 test to CI.
2020-04-16 13:53:04 -04:00
xvzcf
722ca648a1
Overhauled compiler-time CPU-extension detection. (#713)
Refactored .CMake/alg_support.cmake, and kem/ and sig/ CMakeLists.txt files.

Refactored copy_from_pqclean/ templating.

Added custom x64 CPU extension detection code and removed cpu_features.

Removed duplicate Kyber source directories.
2020-04-14 07:58:41 +02:00
Douglas Stebila
854f074808
Fix AddressSanitizer issues and enable in nightly runs (#707)
* Fix buffer overrun on Falcon KATs

* Fix memory leak in Picnic2

* Enable address sanitizer in nightly builds
2020-04-07 13:38:02 -04:00
Michael Baentsch
2ab3e54b74 Fixes PR comment & exposes common Keccak for AVX2 2020-04-07 08:15:52 +02:00
Michael Baentsch
c847efab8f addresses issue #691 2020-04-06 14:51:54 +02:00
Douglas Stebila
c254fddf18
Update AES key schedule API to match PQClean (#701)
* Fix Falcon kat_sig template to match generated code

* Change OQS AES API to match PQClean's

https://github.com/PQClean/PQClean/pull/279

* Change callers to OQS AES API

* copy_from_pqclean commit db0d5800c5c8a32df63414297671cd418ddc3129

* Fix missing argument

* Fix memory leak
2020-04-04 17:10:12 +02:00
Michael Baentsch
768c4aefea formatting corrected 2020-03-30 17:15:44 +02:00
Michael Baentsch
5d690b8746 CPU feature runtime flags support via OQS 2020-03-30 16:28:04 +02:00
Christian Paquin
38c47f7d9f
Properly namespace the picnic internal functions (#676)
* Properly namespaced the picnic internal functions

* Added namespacing for KeccakWidth1600times4 functions.

* Namespace KeccakWidth1600times4 sponge structure.

* Merged macro files and namespaced assembly files.

* Namespaced .name statemetns in avx2 assembly files

* Fixed macro include paths

* Un-namespaced KeccakP1600_AddByte because it is sometimes defined as a macro.

* Namespace function call in assembly.
2020-03-27 10:49:43 -04:00
Vlad Gheorghiu
df189ce69d
Merge pull request #671 from open-quantum-safe/ds-tests-in-threads
Run the test_kem and test_sig tests on a thread when possible
2020-03-27 09:44:05 -04:00
Douglas Stebila
1ff2323752 Properly pass data to/from threads 2020-03-26 20:08:56 -04:00
Douglas Stebila
786141b06e Merge branch 'ds-tests-in-threads' of https://github.com/open-quantum-safe/liboqs into ds-tests-in-threads 2020-03-26 17:37:14 -04:00
Douglas Stebila
8e1bd2327e Only link against threads on clang/gcc 2020-03-26 17:36:14 -04:00
Vlad Gheorghiu
532d0cb36b minor cosmetic change 2020-03-26 11:48:02 -04:00
Douglas Stebila
88693c2f92 Link threads for tests 2020-03-26 10:44:07 -04:00
Vlad Gheorghiu
306d5f9747 put no-thread kems/sigs in array 2020-03-26 10:21:37 -04:00
Douglas Stebila
efdbed4d67 Use strstr instead of strnstr 2020-03-26 09:44:17 -04:00
Douglas Stebila
f437663bd0 Run big stack usage tests on main thread 2020-03-25 17:23:31 -04:00
Douglas Stebila
9742ddf81d
Set sanitizer flags differently (#669)
* Set sanitizer flags differently

* Sanitizer flags should be passed in during compilation now.

* Cosmetic change.

* Missing cast

Co-authored-by: xvzcf <xvzcf@users.noreply.github.com>
2020-03-20 09:32:05 -04:00
Douglas Stebila
2a2393d097 Fix compilation warnings under gcc 2020-03-19 15:23:20 -04:00
Douglas Stebila
4cc03987b1 Run the test_kem and test_sig tests on a thread when possible 2020-03-19 14:57:18 -04:00
Christian Paquin
08300e5b3a
Updated qtesla to v1.0 (#665)
* Updated qtesla to v1.0

* Updated qTesla sizes and KATs after v1.0 changes.
2020-03-19 12:05:10 -04:00
Christian Paquin
e1370050f2 Don't ignore the Windows warnings on nix type compilers 2020-03-17 22:23:59 -04:00