30 Commits

Author SHA1 Message Date
John Schanck
83af71078b
Add canaries around malloc'd regions in test_sig (#993)
* test_sig: Add canaries around malloc'd regions

* test_sig/kem: disable canary checks in test_constant_time

* test_kem: test canaries after testing malformed ciphertext
2021-05-06 19:50:53 -04:00
Thom Wiggers
1923b82a3b
Test without alignment (#986)
* Fix potential NULL dereference in fix_test_kem

* Test without aligned pk, sk

This changes the test_kem.c functions like those in PQClean:
* also prefix magic bytes for checking for out-of-bounds access
* use odd numbers for breaking alignment

Includes #985

* Fix style
2021-05-04 20:27:07 -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
Douglas Stebila
adac989932
Added HQC from PQClean. (#805) 2020-08-04 13:22:45 -04:00
Douglas Stebila
ed1baf3d27 Change to 0.4.0-dev and some cleanup 2020-07-24 20:38:46 -04: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
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
Michael Baentsch
c847efab8f addresses issue #691 2020-04-06 14:51:54 +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
Douglas Stebila
1ff2323752 Properly pass data to/from threads 2020-03-26 20:08:56 -04:00
Vlad Gheorghiu
532d0cb36b minor cosmetic change 2020-03-26 11:48:02 -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
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
xvzcf
7c083329f3
Enabled more Clang warning flags. (#663) 2020-03-16 15:33:14 -04:00
Douglas Stebila
ca66375f30
Switch from clang-format to astyle (#613)
* Initial format with astyle

* Fix templating to match

* Fix files with missing newline at EOF

* Remove old line

* Remove old .clang-format spec

* Add prettyprint target to CMake
2020-02-15 23:34:31 -05:00
Douglas Stebila
54cc101a3d Skip disabled algorithms 2019-08-12 09:30:51 -04:00
Douglas Stebila
8a0af5bc12 Prettyprint 2019-08-03 07:31:01 -04:00
Douglas Stebila
4d492b9270 Add macros containing compilation information and print in test programs
Fixes #331
2019-08-02 22:03:13 -04:00
Douglas Stebila
3ab9044f51 Prettyprint 2019-08-01 14:32:20 -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
85b1cbb5ec
Sync master with nist-branch, including sorting algorithms (#418)
* Sync master with nist-branch, including sorting algorithms

* Forgot to declare function before use
2018-10-14 15:31:22 -04:00
Douglas Stebila
84e8dcb119
Remove old OQS_RAND object and API (#403)
* Remove old RAND API, AES-CTR and ChaCha20-based RNGs, and test_rand.

* Fix build and API for shared libraries

* Fix problems from merge with master
2018-10-09 20:36:57 -04:00
Douglas Stebila
79d77d3617 Sync common signature files on master with nist-branch 2018-10-03 11:56:54 -04:00
Christian Paquin
dc9617f81f Refactored sig api following nist-branch (issue380) (#391)
* Fixed a typo in a comment

* Refactored sig API following nist-branch (also fixes issue 380)

* Fixed Windows compilation error in sig.c.

* Added Picnic to Windows' config, and changed defaul alg to Picnic (since qTesla is not yet supported on Windows)

* Moved sig_picnic and sig_qtesla under sig directory, to harmonize with kem api

* Use different default sig alg on Windows to fix Travis back-compat tests and platform gap.

* Further changes required for OQS to be properly used by applications

* Compare OQS functions's return values to OQS error codes in sig.c.

* Fixed typos in comments.

* Replaced minimal_oqs_sig with example_sig.

* Ensure travis tests fail on error

* Add try-catch block in all-tests.sh

* Ignore example_sig

* Point global-namespace-check to .libs/liboqs.a

* More precise error handling in global-namespace-check

* Warning colours in travis tests and error handling in free-check

* Error handling in style-check

* Clean up style-check

* Removed leftover minimal_sig_oqs ref and VS projects.

* Prettyprint

* Revert clang-format version check

* Re-revert clang-format style check

* Prettyprint

* Added speed_sig to master.

* Removed superfluous extern from sig schemes .h
2018-09-26 10:01:53 -04:00
Douglas Stebila
453516248b
Move tests to a common directory (#335) 2018-08-14 17:00:29 -04:00