27 Commits

Author SHA1 Message Date
Michael Baentsch
9be13d21ed
enable true out-of-source build (#1093) 2021-09-20 10:51:00 -04:00
Michael Baentsch
3bc89ee908
enabling flexible build dir name in testing (#1080) 2021-08-28 14:39:25 -04:00
Michael Baentsch
f3caccff9e
Removing default algs (#1044)
* change to retain OQS_MINIMAL_BUILD logic

* remove default alg support
2021-07-01 11:42:12 +02:00
John Schanck
b36ff9f17c
Replace OQS_PORTABLE_BUILD and OQS_USE_CPU_EXTENSIONS (#951)
* Replace OQS_PORTABLE_BUILD with OQS_DIST_BUILD

Also introduces OQS_OPT_TARGET and removes OQS_USE_CPU_EXTENSIONS

* Only compile sha3 avx2 code on Linux|Darwin

* Use new ARCH_ARM[X] flags in SIKE CMakeLists

* Update test_portability and rename to test_distbuild

* Update documentation for building Windows AMD64 from Ubuntu Bionic

* Update scripts/build-android.sh

* More specific CMAKE_SYSTEM_PROCESSOR for rasppi toolchain

* CI: Use OQS_DIST_BUILD in some jobs

* Replace OQS_get_available_CPU_extensions by OQS_CPU_has_extension

* ARM64v8/ARM32v7 runtime cpu feature detection

* Compile-time detection of some ARM features

* Toolchain files to cross compile for ARM32v7 and ARM64v8

* Remove unnecessary references to CMAKE_BUILD_TYPE=Release

* Use OQS_DIST_BUILD=ON on Windows
2021-03-31 16:30:54 -04:00
John Schanck
fa9c2671ec
Use valgrind to check for secret-dependent branching on 'audit' branches (#904)
* Constant time checks using Valgrind and suppression files

* Suppression file for Kyber (ref+avx), HQC, SIKE, NTRUPrime, McEliece, SIDH, Falcon (ref+avx), SPHINCS, Dilithium r2+r3, picnic

* mark all BIKE implementations as vartime

* Set OQS_DEBUG_BUILD in oqsconfig.h if CMAKE_BUILD_TYPE=Debug

* Add OQS_ENABLE_TEST_CONSTANT_TIME to oqsconfig.h

* Check build options before running

* test_{kem,sig}: avoid direct call to OQS_randombytes_system

* Remove picnic3 issue based on review #889

* fix Kyber namespacing

* Missing BIKE error type, skip BIKE

* Resolve SIDH/SIKE bingcd issue as per #888

* Mark Falcon hash_to_point_vartime issue as resolved

* Disable CI tests
2021-02-25 06:51:01 +01:00
John Schanck
e9348d5500
Switch back to subprocess.run (#908)
* helpers.py: switch back to subprocess.run (revert 346305fc)

* test_free: replace find|grep|xargs with python solution
2021-02-12 06:46:59 +01:00
Goutam Tamvada
dd739fc8f2
OQS_BUILD_PORTABLE -> OQS_PORTABLE_BUILD and other refactoring. (#864)
* OQS_BUILD_PORTABLE -> OQS_PORTABLE_BUILD and associated changes.

* subprocess.run() -> subprocess.Popen() + subprocess.communicate().

* Changed temporary storage location used for memory benchmarking.
2020-12-09 15:03:57 -05: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
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
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
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
Nikita Karpey
885645686e
Reworked search for executable files in tests (#630) 2020-02-25 12:29:09 -05:00
xvzcf
9c01847b21
Refactored oqsconfig.h.cmake (#628)
* Added OQS_ prefix and assigned values to all #defines in oqsconfig.h.cmake

* Updated CI and templating scripts
2020-02-24 18:04:01 -05:00
xvzcf
889a03bd15
Switched build system to CMake. (#556)
* Removed cross-compilation scripts and associated Travis CI workflows.
2020-02-14 14:03:29 -05:00
Christian Paquin
d68bacfa58 Fix nightly qtesla failure on gcc5 (#573) 2019-12-16 12:01:39 -05:00
Christian Paquin
4cb278e36a Adds avx2 implementation for qtesla (#553)
* Renamed qtesla portable folder, to better integrate avx2 files.

* Added avx2 support to qtesla

* Disabled KAT check for qtesla when avx2 is enabled.

* Commented the disabling of kat check for qtesla w/ avx2

* Fixed portable qtesla version and disabled avx2 on windows.

* Now reads use options from oqsconfig.h, accessible in CI tests.

* Skip config option check on windows.

* Moved cshake128x4 from qtesla dir to common sha3 dir.

* Added qtesla avx2 KATs, and use them when avx2 is enabled

* Prettyprint

* Fixed the qtesla avx2 condition check (needed a not xor)
2019-11-05 19:03:33 -05:00
Douglas Stebila
99a05f698a Fix bugs for tests on Windows 2019-08-01 19:50:55 -04:00
Douglas Stebila
c7c0576425 Fix typo 2019-08-01 18:15:01 -04:00
Douglas Stebila
cd2dbe2520 Try to make Python tests run on Windows 2019-08-01 16:54:57 -04:00
Douglas Stebila
da44cbca68 Switch free check to Python test suite 2019-08-01 14:49:18 -04:00
Douglas Stebila
30d44b8ba4 Switch algorithm datasheets checks to Python test suite 2019-08-01 14:30:25 -04:00
Douglas Stebila
52ccd7729a Switch style checks to Python test suite 2019-08-01 14:13:39 -04:00
Douglas Stebila
91614924b6 Make test_kem and test_sig run one algorithm at a time 2019-08-01 13:36:41 -04:00
Douglas Stebila
ba6027f4f4 Change how disabled KEMs are handled 2019-08-01 13:20:32 -04:00
Douglas Stebila
ab970ae2c0 Switch KEM KAT checks to Python test suite 2019-08-01 11:53:15 -04:00
Douglas Stebila
e7ecb4263a Don't use subprocess.run 2019-07-30 22:41:20 -04:00
Douglas Stebila
f660424dea Add unit tests for SHA-2 API 2019-07-30 20:54:47 -04:00