Commit Graph

334 Commits

Author SHA1 Message Date
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
Thom Wiggers
e7d936e24a
Merge pull request #186 from leonbotros/leda
LEDAcrypt KEM-LT
2019-06-17 18:33:02 +02:00
Leon
3c733b6691 resolve todo, remove asserts, add duplicate checks and make sure they pass 2019-06-17 14:03:59 +02:00
Matthias J. Kannwischer
d5818a40b0 change include order; add missing includes (#185) 2019-06-11 15:09:07 +02:00
Matthias J. Kannwischer
e56b2e5556
Add Dilithium (#172)
* fixes dynamic memory allocation test. previously a function called freeze() would trigger it

* this adds DilithiumII. Preprocessor conditionals still need to be removed

* fix ms Makefile

* fix MS compiler warnings

* clean-up

* remove preprocessor conditionals

* add dilithium3

* add dilithium4

* add duplicate consistency checks

* SHA2 state constants in common

* clean up symmetric.h

* Port SPHINCS+-SHA256 to sha256ctx struct

* Implement ctx struct for fips202

* Port Kyber{512,768,1024} to fips202 ctx struct

* Port NewHope to fips202 structs

* Port SPHINCS+-SHAKE256 to fips202 ctx structs

* Use opaque fips202 structs in MQDSS

* port dilithium to use fips202 ctx structs

* include -Wredundant-decls

* remove comment; format NTT constants

* reduce casts in power2round
2019-06-11 04:18:05 -05:00
Ko-
eca0ebd374 Add test for functions from SP800-185. 2019-06-07 11:46:55 +02:00
Douglas Stebila
2f3c0bd4ec
Merge pull request #179 from ronnyws/master
Expand the pattern rule for the three common tests.
2019-06-03 08:25:23 -04:00
Ronny Wichers Schreur
69e00a5b7f Expand the pattern rule for the three common tests.
Fixes https://github.com/PQClean/PQClean/issues/178.
2019-05-29 15:10:11 +02:00
Douglas Stebila
9a82706697
Merge pull request #176 from PQClean/frodoopt
Add optimized FrodoKEM
2019-05-22 11:45:20 +02:00
Matthias J. Kannwischer
c7c080568e add opt versions of frodokem976aes, frodokem976shake, frodokem1344aes, frodokem1344shake and the corresponding duplicate checks 2019-05-22 07:42:43 +02:00
Matthias J. Kannwischer
df4319c47f add duplicate consistency check 2019-05-21 15:58:20 +02:00
Thom Wiggers
b153768783
Implement ctx struct for fips202 2019-05-20 10:22:51 +02:00
Thom Wiggers
7c30aa73c9
SHA2 state constants in common 2019-05-20 09:20:12 +02:00
Douglas Stebila
ed9ec18c63
Merge pull request #160 from PQClean/newhope
Add NewHope
2019-05-18 13:56:04 +02:00
Matthias J. Kannwischer
3d67b4c1c2 add duplicate consistency checks and remove some comments 2019-05-17 16:10:07 +02:00
Matthias J. Kannwischer
0dd0a4a528 fix format strings for Windows 2019-05-16 11:30:24 +02:00
Matthias J. Kannwischer
951f7a0824 check nist kats for signatures. resolves #169 2019-05-16 11:20:18 +02:00
Matthias J. Kannwischer
0127ba93f5 Add IND-CPA/IND-CCA2 security field to METADATA. add test for it as well (#165) 2019-05-13 11:20:32 -04:00
Matthias J. Kannwischer
1597e62514 add IND-CPA/IND-CCA2 security field to METADATA. add test for it as well 2019-05-13 13:17:41 +02:00
Douglas Stebila
4270a54161
Merge pull request #162 from PQClean/mqdss
MQDSS
2019-05-10 10:43:59 -04:00
Douglas Stebila
3d7cbefd3b
Merge pull request #118 from PQClean/all-the-sphincs
Add ALL the SPHINCS
2019-05-10 10:43:09 -04:00
Matthias J. Kannwischer
aaea91f315 change ciphertext to completly random value to also cover only passively secure schemes 2019-05-09 07:38:17 +02:00
Joost Rijneveld
2e0288904a
Rename makefile test to avoid confusion 2019-05-06 16:15:21 +02:00
cryptojedi
56a3715ddc Kyberv2 (#150)
* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* More fixes for MS compiler

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* More fixes for MS compiler

* Started more cleanup work on Kyber768

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* Making MS compiler happy

* More fixes for MS compiler

* More fixes for MS compiler

* Started more cleanup work on Kyber768

* Kyber768 passing all tests locally

* Kyber512 passes all tests locally

* Kyber1024 now also passing all tests locally

* Now passing all tests with -Wmissing-prototypes

* Local tests (on Linux) passing again
2019-05-06 14:50:27 +02:00
Douglas Stebila
6e1f66d047
Don't run testvectors checks on KEMs (#161) 2019-04-30 11:15:57 -04:00
Joost Rijneveld
cec568d235
Add test to check for existence of both makefiles 2019-04-30 11:35:51 +02:00
Joost Rijneveld
d219bd7a16
Remove api.h from duplicate files 2019-04-30 11:23:40 +02:00
Joost Rijneveld
444e43986e
Add duplicate checks for MQDSS 2019-04-30 11:16:59 +02:00
Douglas Stebila
5b733ede1c Add ntruhrss701 2019-04-29 09:41:17 -04:00
Douglas Stebila
ea8fd5886c Add ntruhps4096821 2019-04-29 09:41:17 -04:00
Douglas Stebila
fb31e71e7e Metadata and duplicate consistency fixes for ntruhps2048677 2019-04-29 09:41:17 -04:00
Joost Rijneveld
08e6c6c052
Use more standard -Wvla 2019-04-24 13:57:19 +02:00
Joost Rijneveld
68b12866ce
Use more standard Wvla 2019-04-24 13:52:02 +02:00
Joost Rijneveld
908329e0e8
Throw errors when using variable-length arrays
Windows already complains about this in CI, but this will
let us catch these issues on Linux as well.
2019-04-24 12:42:59 +02:00
Joost Rijneveld
e32666a0ab
Throw errors when using variable-length arrays
Windows already complains about this in CI, but this will
let us catch these issues on Linux as well.
2019-04-24 12:35:17 +02:00
Joost Rijneveld
3d09ea3ad5
Add duplicate consistency checks 2019-04-23 13:09:16 +02:00
Joost Rijneveld
85be522a16
Merge pull request #154 from PQClean/detect_travis_Cron
Detect cron builds on Travis CI
2019-04-23 12:53:17 +02:00
Joost Rijneveld
fa7d257832
Make diffs in dup_consistency files part of scheme
Previously, changing a duplicate_consistency file would be
considered a 'global' change, resulting in CI re-running all tests
for all schemes.
2019-04-23 12:21:38 +02:00
Thom Wiggers
029146566e
Detect cron builds on Travis CI 2019-04-23 09:42:10 +02:00
Thom Wiggers
da10273e52
Merge pull request #117 from PQClean/run-only-diffs
Be more selective in test runs
2019-04-19 17:09:29 +02:00
Joost Rijneveld
baf93e2826
Merge pull request #146 from PQClean/move-secret-key-to-scheme-meta
Move secret key length back to scheme-level META
2019-04-18 17:14:08 +02:00
Thom Wiggers
f39b300e4e
Reduce number of tests for functest 2019-04-18 11:26:28 +02:00
Thom Wiggers
15bd2d4fb4
another attempt at fixing appveyor 2019-04-18 11:26:28 +02:00
Thom Wiggers
65d43df241
Change permit test into a decorator
This way we can properly raise skiptest
2019-04-18 11:26:28 +02:00
Thom Wiggers
98780c6e8e
use yaml.safe_load to silence warning. 2019-04-18 11:26:28 +02:00
Thom Wiggers
a7a8c02c27
master may not be available 2019-04-18 11:26:28 +02:00
Thom Wiggers
33605f05d8
Set PQCLEAN_ONLY_DIFF on CI builds 2019-04-18 11:26:27 +02:00
Thom Wiggers
323b49ca6b
Merge pull request #147 from PQClean/slow-tests
Slow tests
2019-04-18 08:57:58 +02:00
Thom Wiggers
b5d4e93478
Add -O3 to CFLAGS 2019-04-17 11:56:16 +02:00
Thom Wiggers
3e95b0b4d7
Add slow test annotator 2019-04-17 11:17:46 +02:00
Thom Wiggers
157d7b7a78
Fix trailing whitespace 2019-04-17 11:10:49 +02:00
Joost Rijneveld
972315dec5
Move secret key length back to scheme-level META 2019-04-17 11:08:45 +02:00
Douglas Stebila
09632377f9 Skip clang-tidy on Windows 2019-04-16 20:59:37 -04:00
Douglas Stebila
24938353ac Merge branch 'master' into nist-kat 2019-04-16 14:19:20 -04:00
Thom Wiggers
546d9e41f2
Make output of sanitizer nicer 2019-04-16 13:28:43 +02:00
Thom Wiggers
327429b625
Make sure -fsanitizer binaries are always cleaned up 2019-04-16 13:28:43 +02:00
Thom Wiggers
9c4aebd8e3
sanitizers don't need valgrind 2019-04-16 12:39:14 +02:00
Joost Rijneveld
fc7afd8f76
Add distclean to clean entire ../bin folder 2019-04-16 10:35:48 +02:00
Thom Wiggers
09a35993da
Skip Valgrind on OSX 2019-04-15 16:21:44 +02:00
Thom Wiggers
a5e906a306
Fix sanitizer test 2019-04-15 16:05:20 +02:00
Douglas Stebila
b80eebdd71 Fix Windows type warning 2019-04-14 20:31:17 -04:00
Douglas Stebila
97260c2d69 Fix reference to nistkatrng 2019-04-14 19:35:28 -04:00
Douglas Stebila
c54cdca983 Build nistkat on Windows 2019-04-14 19:31:15 -04:00
Douglas Stebila
53ac90861c Temporarily skip NIST KAT check for kyber768 2019-04-14 17:19:52 -04:00
Douglas Stebila
a815543f32 Add NIST KAT check for KEMs 2019-04-14 17:17:11 -04:00
Matthias J. Kannwischer
5587cdb4a8 Add -Wmissing-prototypes (#109)
* fix prototypes for sphincs and static functions in aes.c

* fix missing prototypes in all frodo variants

* fix missing prototypes in kyber

* remove const from non-pointer arguments in Frodo

* add missing prototypes to requirements in README
2019-04-13 11:47:29 -04:00
Douglas Stebila
d07e8ae7cb
Filter tests when diff'ing against master branch (#103) 2019-04-11 15:23:39 -04:00
Douglas Stebila
518e8656be Merge branch 'master' into frodo-aes 2019-04-11 13:48:50 -04:00
Douglas Stebila
0bc19b3633
Fix a few nits (#107)
* Minor changes

* Gracefully degrade if clang-tidy segfaults

* Typo on returncode
2019-04-11 13:47:53 -04:00
Thom Wiggers
5b0174d282 Avoid clang tidy segfault (#106)
* Gracefully degrade if clang-tidy segfaults

* Typo on returncode
2019-04-11 13:22:50 -04:00
Douglas Stebila
1e7ee7a4c2 skip_windows decorator 2019-04-11 09:23:35 -04:00
Thom Wiggers
b2ef82e2da
Remove duplicate namespace_prefix 2019-04-11 15:11:18 +02:00
Douglas Stebila
b7f390368e Merge branch 'master' into frodo-aes 2019-04-11 08:15:40 -04:00
Joost Rijneveld
7dcedfc56c
Allow -fix-errors to fix linter errors 2019-04-11 10:10:05 +02:00
Joost Rijneveld
e9d1829de7
Merge pull request #95 from PQClean/aes
Aes
2019-04-11 09:58:46 +02:00
Joost Rijneveld
a7c147f410
Include 'common' in name of common test binaries 2019-04-11 09:54:52 +02:00
Douglas Stebila
cfc9705751 test_format wasn't actually checking output of astyle
It was only checking the return code, but astyle was always returning 0. 
Changed to parse the output and look for the string "Formatted"
2019-04-10 21:23:33 -04:00
Douglas Stebila
42a5e0e4ad Use environment variables to selectively filter tests 2019-04-10 17:03:02 -04:00
Douglas Stebila
8b4f656376 Skip too-slow valgrind tests on i386 CircleCI builds 2019-04-10 14:14:49 -04:00
Douglas Stebila
0ee03d4c3f Merge branch 'aes' into frodo-aes 2019-04-10 12:31:12 -04:00
Douglas Stebila
c40276dd4a Link against AES object on Windows 2019-04-10 12:30:02 -04:00
Douglas Stebila
30c8661d82 Add FrodoKEM-1344-AES 2019-04-10 12:16:24 -04:00
Douglas Stebila
999ea3afed Add FrodoKEM-976-AES 2019-04-10 12:11:27 -04:00
Douglas Stebila
395f14a2f6 Allow multiple sources for duplicate consistency checks; break into multiple unit test to improve output 2019-04-10 12:07:49 -04:00
Joost Rijneveld
69b74706c1
Fix SHA3 test 2019-04-10 17:54:52 +02:00
Douglas Stebila
e9427afeb2 Add FrodoKEM-640-AES 2019-04-10 11:51:09 -04:00
Douglas Stebila
aea72d3eb2 Add macros for AES block size 2019-04-10 11:50:23 -04:00
Joost Rijneveld
e766700a81
Add test_aes to make clean 2019-04-10 17:43:04 +02:00
Douglas Stebila
a2c2521e81 Merge branch 'master' into frodo-aes 2019-04-10 11:37:44 -04:00
Joost Rijneveld
5d600a2543
Split tests into primitives
This ensures separate errors for separate common files
2019-04-10 16:42:28 +02:00
Joost Rijneveld
f4607265c6
Remove unused imports 2019-04-10 16:37:59 +02:00
Joost Rijneveld
03eb577a40
Pass list instead of single command to subprocess 2019-04-10 16:37:02 +02:00
Joost Rijneveld
280bc60b1b
Use standard helper to skip Windows for /common 2019-04-10 16:34:44 +02:00
Peter Schwabe
28337843b9 Added python test running all unit tests of common crypto functions 2019-04-10 16:02:45 +02:00
Peter Schwabe
4970379baf Added simple test for AES 2019-04-10 13:24:42 +02:00
Joost Rijneveld
5853cb8e50
Test for preprocessor conditionals 2019-04-09 17:23:31 +02:00
Joost Rijneveld
9e5fd74823
Test for prohibited includes in api.h 2019-04-09 17:19:20 +02:00
Douglas Stebila
6fabab1fd9 Merge branch 'master' into more-frodo 2019-04-09 09:06:20 -04:00
Joost Rijneveld
cffe944bbf
Check that implementations are uniquely named 2019-04-08 11:39:17 +02:00
Joost Rijneveld
fe010541ec
Move secret key length to implementation meta 2019-04-08 11:39:17 +02:00
Thom Wiggers
6257e9ea48
Merge pull request #91 from PQClean/detached-signatures
Test detached signatures
2019-04-08 11:37:36 +02:00
Joost Rijneveld
493d77d89b
Ensure tests do not break without schemes 2019-04-08 11:14:45 +02:00
Joost Rijneveld
87a3c6ab39
Add functest/testvectors for detached signatures 2019-04-08 10:23:24 +02:00
Douglas Stebila
e697ee7fdd Merge branch 'master' into more-frodo 2019-04-07 08:15:13 -04:00
Douglas Stebila
7a5f7b9941
Enable some extra warnings (#67)
Enable some extra warnings
2019-04-07 08:14:41 -04:00
Douglas Stebila
2d6be066e7 Add FrodoKEM-1344-SHAKE 2019-04-06 09:22:15 -04:00
Douglas Stebila
bef34697fb Pull pycparser submodule if it's not present 2019-04-06 09:21:40 -04:00
Douglas Stebila
46aa7ff9b2 Move duplicate consistency data outside of META.yml 2019-04-06 09:07:44 -04:00
Douglas Stebila
a296085e57 Merge branch 'master' into more-frodo 2019-04-06 08:51:03 -04:00
Joost Rijneveld
e2fcad2823
Merge branch 'master' into reduce-iterations 2019-04-06 13:10:21 +02:00
Thom Wiggers
1e9defd090
build printparams on Windows 2019-04-05 17:21:56 +02:00
Thom Wiggers
d1fd8aa934
Check the specified sizes of the metadata match api.h consts
Fixes #88
2019-04-05 17:04:37 +02:00
Thom Wiggers
c95d2816bd
Enable some extra warnings
These warnings should help catch some non-obvious bugs.
2019-04-05 16:44:54 +02:00
Thom Wiggers
d39d7c66db
Add missing metadata to META 2019-04-05 16:38:26 +02:00
Joost Rijneveld
f355e77407
Clarify and reduce iterations for sig testvectors
This is actually different from signature functests,
which only tests mlen=32. Can be fixed later as that does
not impact the testvectors.
2019-04-05 16:32:39 +02:00
Douglas Stebila
19d177efb3 Use 5 iteractions for functional tests and test vectors 2019-04-05 10:22:52 -04:00
Joost Rijneveld
41edb79c0a
Clarify cc vs cpp 2019-04-05 13:04:32 +02:00
Thom Wiggers
4e47a0b513
Skip the prohibit-char test on Windows due to lack of cc 2019-04-05 10:39:08 +02:00
Thom Wiggers
bfa8589f96
Use cc -E instead of cpp 2019-04-05 10:31:31 +02:00
Douglas Stebila
0145ddaa1b More stack! 2019-04-04 12:45:24 -04:00
Douglas Stebila
301f7aca57 Always return negative numbers so positive+negative != 0 2019-04-04 12:39:47 -04:00
Douglas Stebila
49729d6da0 Larger stack size for FrodoKEM 976 on Windows 2019-04-04 12:39:04 -04:00
Douglas Stebila
ad4984fdad Improve skipping for duplicate_consistency test 2019-04-04 12:38:47 -04:00
Douglas Stebila
7a4e0d445b Skip duplicate consistency check on Windows (i.e., if sed not available) 2019-04-04 12:07:54 -04:00
Douglas Stebila
bc5d18e7cd Add duplicate consistency check 2019-04-04 12:05:43 -04:00
Joost Rijneveld
97e428a0b7
Skip preprocessing when cpp unavailable 2019-04-04 14:52:11 +02:00
Joost Rijneveld
17fc0da52e
Prohibit using char without explicit sign modifier
Related to #79
2019-04-04 13:49:15 +02:00
Douglas Stebila
4162be0401 Switch for int and unsigned char to size_to and uint8_t 2019-04-02 14:06:06 -04:00
Douglas Stebila
06973e6127 Force make clean on test_compile_lib
Helpful for local builds, even though it has no effect on fresh CI builds
2019-03-31 22:00:39 -04:00
Douglas Stebila
812c7f54ac Global search and replace on sed 2019-03-21 22:56:28 -04:00
Thom Wiggers
e811376a95
Do the test more properly 2019-03-19 15:20:59 +00:00
Thom Wiggers
6558773b21
Check if header guard is defined properly
Does this slightly uglily, but it should work.
2019-03-19 15:02:09 +00:00
Thom Wiggers
05b0f6d9cc
Namespace the #define constants. 2019-03-19 13:28:15 +00:00
Joost Rijneveld
f0ffc59696
Add SHA224 for completeness 2019-03-11 16:50:00 +01:00
Joost Rijneveld
83810dcc47
Expose incremental SHA2 API 2019-03-11 16:50:00 +01:00