Commit Graph

268 Commits

Author SHA1 Message Date
Thom Wiggers
698738c263 Enable leak check in Valgrind 2021-03-24 21:02:46 +00:00
Thom Wiggers
5bad0df0b6 Fix detecting of to-be-tested changes on Windows 2021-03-24 21:02:46 +00:00
Thom Wiggers
07db9c1e60 Put all common primitives on the heap (#266)
* Put AES ctx on the heap

This forces people to use the ``ctx_release`` functions, because otherwise there will be leaks

* Put fips202 on the heap

* Add much more docs for fips202.h

* fixup! Put fips202 on the heap

* Put SHA2 on the heap-supporting API

* Fix clang-tidy warnings

* Fix unreachable free() in falcon

* Fix McEliece8192128f-sse GNU Makefile
2021-03-24 21:02:45 +00:00
Thom Wiggers
ac2c20045c Classic McEliece (#259)
* Add McEliece reference implementations

* Add Vec implementations of McEliece

* Add sse implementations

* Add AVX2 implementations

* Get rid of stuff not supported by Mac ABI

* restrict to two cores

* Ditch .data files

* Remove .hidden from all .S files

* speed up duplicate consistency tests by batching

* make cpuinfo more robust

* Hope to stabilize macos cpuinfo without ccache

* Revert "Hope to stabilize macos cpuinfo without ccache"

This reverts commit 6129c3cabe1abbc8b956bc87e902a698e32bf322.

* Just hardcode what's available at travis

* Fixed-size types in api.h

* namespace all header files in mceliece

* Ditch operations.h

* Get rid of static inline functions

* fixup! Ditch operations.h
2021-03-24 21:02:45 +00:00
Thom Wiggers
22e2551c95 Also run duplicate consistency checks on windows (#261) 2021-03-24 21:02:45 +00:00
Leon Botros
13c0317e25 Add ephemeral versions of ThreeBears 2021-03-24 21:02:45 +00:00
Thom Wiggers
77e9a23431 Move keys to heap for KEMs as well 2021-03-24 21:02:45 +00:00
Thom Wiggers
303a741192 Move keys in crypto_sign/functest.c to the heap
Having the keys on the stack increases the stack space consumption by
quite a bit, and this in turn results in the sanitizer tests failing
for Rainbow.

Moving the keys to the heap in the test seems like a harmless change.
2021-03-24 21:02:45 +00:00
Thom Wiggers
facb527c7c SPHINCS+ optimized implementations (#253)
* Add state destroy to SHA2 API

* Include optimized SPHINCS+ implementations

I've generated new implementations from the sphincsplus repository.

* Don't destroy sha256ctx after finalize

* Attempt to shut up MSVC

* Make sure to drop errors in rmtree
2021-03-24 21:02:45 +00:00
Thom Wiggers
a4e31f16a2 Fix isolation in test_metadata_sizes (#258) 2021-03-24 21:02:45 +00:00
Thom Wiggers
9c35647461 MacOS ABI versions of Keccak 2021-03-24 21:02:45 +00:00
Thom Wiggers
cb729b6a03 Fix duplicate consistency files
Every .s file is now handled through CC
2021-03-24 21:02:45 +00:00
Thom Wiggers
6cd265f5b9 fixup! Add Dilithium's AVX2 implementations 2021-03-24 21:02:45 +00:00
Thom Wiggers
377d0cbf1a Support unaligned vectors in pycparser 2021-03-24 21:02:45 +00:00
Thom Wiggers
6682216791 Add Dilithium's AVX2 implementations 2021-03-24 21:02:45 +00:00
Leon Botros
36b6142794 remove empty lines at end of file 2021-03-24 21:02:45 +00:00
Leon Botros
2d9e259608 add duplicate consistency checks 2021-03-24 21:02:44 +00:00
Sebastian
56a0fcb135 qTESLA (#239)
* Copied qTESLA-p-I round2 (2019-08-19) code

* Code compiles, NIST-KAT works

* Included detached signature API

* Generated testvectors

* Fixed name in api.h

* code style

* Fixed error in Makefile

* Passing pytest

* Fixing types (uint8_t bytes and size_t indices)

* Replaced SHAKE with SHAKE128 where necessary

* Fixed bug: (signed) integer overflow

* Added qTESLA-p-III

* Code is now independent of machine endianness

* repaired Microsoft makefile
2019-10-21 14:26:27 +02:00
Thom Wiggers
f792b925b4 Enable optimizers on Windows (#244) 2019-10-21 14:23:59 +02:00
Matthias J. Kannwischer
1e04996465 re-add duplicate consistency checks 2019-09-24 14:43:23 +02:00
Thom Wiggers
7931383443
fixup! Add Kyber90s
Add duplicate consistency files
2019-09-24 08:01:54 +02:00
Matthias J. Kannwischer
1d789dc90d check algo names 2019-09-19 12:43:57 +02:00
Thom Wiggers
88e59b3d61
Merge pull request #232 from PQClean/fix_incremental_sha512
Fix incremental sha512
2019-09-12 10:27:20 +02:00
Thom Wiggers
f4bd312180 Adds AVX2 variants of Kyber512, Kyber768, Kyber1024 (#225)
* Integrate Kyber-AVX2 into PQClean

* Fix types and formatting in Kyber

* Workaround a valgrind crash

* Remove comment in shuffle.s

* Remove some extraneous truncations

* fixup! Fix types and formatting in Kyber
2019-09-10 11:45:01 +02:00
Matthias J. Kannwischer
d83d4a4bf1 add test for incremental sha512 2019-09-10 11:27:23 +02:00
Thom Wiggers
2eaf382689 Add support for specifying architecture and feature limits (#224)
* Add support for specifying architecture and feature limits

* cpuinfo not supported on ppc

* Detect 32-bit python interpreter on 64-bit CPU

* Fix bugs in isolated tests

* Also support restricting operating system
2019-09-06 12:01:44 +02:00
Thom Wiggers
aa46b5239d Enable valgrind exit errorcode and remove Rainbow (#223)
* Enable valgrind exit errorcode

It seems we were not doing anything with the valgrind results... D:

* Use --exit-on-first-error if available

* Revert "Merge pull request #182 from PQClean/rainbow"

This reverts commit 8a008417fe, reversing
changes made to d4b612fe9a.
2019-09-05 10:08:42 +02:00
Thom Wiggers
2753302605
Merge pull request #227 from leonbotros/ledav2.1
update LEDA to v2.1
2019-08-29 10:08:33 +02:00
Leon Botros
42256ec189 forgot to add updated dupicate consistency checks 2019-08-24 16:55:15 +02:00
Leon Botros
9dd4a4b5da fix requested changes 2019-08-24 15:48:38 +02:00
Thom Wiggers
8a120b3be7
Render proper diffs for duplicate_consistency test (#228)
Use Python's built-in ``diflib`` to compute diffs between the two versions.
2019-08-23 15:15:45 +02:00
Leon Botros
b084f55ff6 update duplicate consistency checks 2019-08-21 21:29:08 +02:00
Leon Botros
7d371dd449 revert test makefile 2019-08-21 21:27:30 +02:00
Leon Botros
e4a5cc3cf2 add karatsuba + toom-cook-3 without VLAs 2019-08-21 17:31:57 +02:00
Leon Botros
ca898f01bc update implementations to leda v2.1 2019-08-21 14:28:31 +02:00
Thom Wiggers
56bb81d053
Fix display of test results summary on CircleCI (#219)
* Reduce pytest xml log size
* store artifact to debug
* Fix test result path
2019-08-07 10:03:17 +02:00
Thom Wiggers
fbe01a7d3c
Remove clang-tidy -fix flag handlign (doesn't work) 2019-08-01 09:13:30 +02:00
Matthias J. Kannwischer
6e12692b4e
Merge pull request #215 from PQClean/less_tests_for_valgrind
Reduce the number of test runs for Valgrind tests
2019-08-01 08:44:08 +02:00
Thom Wiggers
9067d622ab
Disable clang-tidy on i386 2019-07-30 10:21:11 +02:00
Thom Wiggers
b4d3968130
Reduce the number of test runs for Valgrind tests
This should drastically reduce the runtime of the valgrind tests
2019-07-29 15:25:41 +02:00
Thom Wiggers
78a65d6ec9 Parallel tests (#206)
* Do tests with pytest to run them in parallel

* attempt to handle merge commits better for PR test path

Similar to how we solved this for travis

* Clean up imports

* don't run valgrind if not specified slow_test

* Fix functest after initializer rename

* upload tests results as junit

* Upload test-common files since #200 got merged

* Catch test results upload failure
2019-07-29 10:38:25 +02:00
Thom Wiggers
133a38b890 Move test support files into tests directory (#200)
* Move test support files into tests directory

* Fix common tests dir in test

* Fix Windows Makefile for common tests

* notrandombytes.obj should be in TEST_COMMON_DIR
2019-07-26 10:26:14 +02:00
Matthias J. Kannwischer
fcbf6d98f2 add duplicate consistency checks 2019-07-16 15:56:02 -04:00
Thom Wiggers
0ed5ba4a30
Merge pull request #192 from PQClean/saber
Add Saber
2019-07-04 15:53:57 +02:00
Douglas Stebila
4157e0fbad Add release function for AES key schedule 2019-06-25 09:37:23 -04:00
Matthias J. Kannwischer
e543aea8ea add duplicate consistency checks for saber 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
a971a3188b Revert "temporarily disable pre-processor test"
This reverts commit def5bddb62098afe134ed30dbeb82f0c195968cc.
2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
7883f8ce8c Make auxiliary-submitters optional. Saber does not have any 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
ca1add7baf temporarily disable pre-processor test 2019-06-24 09:12:40 +02:00
Thom Wiggers
4cea81d15f
Convert principal-submitter into a list
There are schemes, like SABER (#192) that have more than one principal
submitter. Consistency warrants that we turn it into a list for all
schemes and don't do something with allowing either a str or a list:
that would just be very annoying to parse.

Closes #194
2019-06-21 09:30:55 +02:00