1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00
Commit Graph

277 Commits

Author SHA1 Message Date
John M. Schanck
722b510358 NTRU: duplicate consistency 2021-03-24 21:02:46 +00:00
Matthias J. Kannwischer
22babfef8a remove threebears, ledakem, newhope, mqdss, qtesla
NIST announced the Round 3 finalists and alternate candidates today:
https://groups.google.com/a/list.nist.gov/d/msg/pqc-forum/0ieuPB-b8eg/Cl7Ji8TpCwAJ

Some of the schemes in PQClean did not make it to Round 3 and this commit
removes them.
2021-03-24 21:02:46 +00:00
Thom Wiggers
8e27bd0915 Add MQDSS AVX2 implementations (#288)
* Add AVX2 version of mqdss

* Fix duplicate consistency
2021-03-24 21:02:46 +00:00
Thom Wiggers
1f8b852e8f Speed up test collection (#298)
* don't do filesystem operations during collection

* Greatly speed up test collection

* fixup! Greatly speed up test collection

* Silence junit warning

* fixup! Greatly speed up test collection
2021-03-24 21:02:46 +00:00
Thom Wiggers
1edad0d3cc Filter out clang-tidy on alternate platforms 2021-03-24 21:02:46 +00:00
Thom Wiggers
a66d24971f Speed up circleci tests 2021-03-24 21:02:46 +00:00
Douglas Stebila
cf5107b69f Split aes*_keyexp up into ecb and ctr variants 2021-03-24 21:02:46 +00:00
Sebastian
4054af0c42 HQC submission (#202)
* Sebastian's HQC merge request

* Clean up changes to common infrastructure

* Fix Bitmask macro

It assumed that ``unsigned long`` was 64 bit

* Remove maxlen from nistseedexpander

It's a complicated thing to handle because the value is larger than size_t supports on 32-bit platforms

* Initialize buffers to help linter

* Add Nistseedexpander test

* Resolve UB in gf2x.c

Some of the shifts could be larger than WORD_SIZE_BITS, ie. larger than
the width of uint64_t. This apparently on Intel gets interpreted as the
shift mod 64, but on ARM something else happened.

* Fix Windows complaints

* rename log, exp which appear to be existing functions on MS

* Solve endianness problems

* remove all spaces before ';'

* Fix duplicate consistency

* Fix duplicate consistency

* Fix complaints by MSVC about narrowing int

* Add nistseedexpander.obj to COMMON_OBJECTS_NOPATH

* astyle format util.[ch]

* add util.h to makefile

* Sort includes in util.h

* Fix more Windows MSVC complaints

Co-authored-by: Sebastian Verschoor <sebastian@zeroknowledge.me>
Co-authored-by: Thom Wiggers <thom@thomwiggers.nl>
2021-03-24 21:02:46 +00:00
Thom Wiggers
ea5ede6e80 Make sure tests respond to undefined behaviour 2021-03-24 21:02:46 +00:00
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