Commit Graph

572 Commits

Author SHA1 Message Date
Frank Denis
cf217e3dfc Call misuse() if we ask too much data from the IETF variant of ChaCha20
Fix #753
2018-09-08 02:12:23 +02:00
Frank Denis
69a5643477 Add chacha20-poly1305 test from Project Wycheproof 2018-09-04 15:44:42 +02:00
Frank Denis
cb22446db1 Add aes256gcm tests from project wycheproof 2018-08-30 09:51:28 +02:00
Frank Denis
cdc4822c92 Remove unneeded trailing commas 2018-08-30 09:26:16 +02:00
Frank Denis
f8377e9818 Add x25519 test vectors from project wycheproof 2018-08-29 15:08:26 +02:00
Jakob Rieck
543b5ad068 Fixes padding for blocksizes > 256 2018-08-27 11:42:49 +02:00
Frank Denis
ccb2390e9c xchacha20 test: initialize the full nonce
Spotted by @FiloSottile, thanks!

Fixes #742
2018-08-03 23:23:53 +02:00
Frank Denis
415f079692 zap trailing spaces 2018-04-29 17:49:01 +02:00
Emil Bay
2ad8162218
Missing test for abytes 2018-04-12 17:24:10 +02:00
Frank Denis
6a60818982 C++ compat 2017-12-21 22:35:02 +01:00
Frank Denis
8a2833f01a Remove the dummy FS call from the Javascript tests 2017-12-21 21:37:02 +01:00
Frank Denis
72ab8739a2 Javascript tests: don't call FS.*() if the filesystem module is not present 2017-12-21 21:36:56 +01:00
Frank Denis
bd631649c1 Emscripten: run the tests in benchmark mode 2017-12-21 18:52:59 +01:00
Frank Denis
d7f8f6bc80 Static 2017-12-21 18:47:43 +01:00
Frank Denis
0187ba70ad Require the generichash state to be aligned
Alignment is already required by other functions anyway.
2017-12-21 18:21:43 +01:00
Frank Denis
1e7839a90c Lift alignment requirements in crypto_generichash() 2017-12-21 18:14:17 +01:00
Frank Denis
dce1614eee Use default randombytes implementation for tests on emscripten 2017-12-21 02:02:39 +01:00
Frank Denis
13201046e6 emscripten: stick to the unique randombytes implementation 2017-12-21 00:32:42 +01:00
Frank Denis
69642f0409 Undefine printf if required 2017-12-16 21:01:23 +01:00
Frank Denis
bfc8ec1248 Add a memleak checker to the benchmark code
Plug the leaks it surfaced in pwhash_argon2* tests
2017-12-16 14:51:11 +01:00
Frank Denis
b84e4b9ddf Add missing sodium_free() calls in the kdf test 2017-12-16 14:31:01 +01:00
Frank Denis
99fe302562 Make things more explicit 2017-12-16 13:12:07 +01:00
Frank Denis
b6dab1029d Sort 2017-12-16 13:08:55 +01:00
Frank Denis
31b13ada14 + #include <limits.h> 2017-12-16 13:08:34 +01:00
Frank Denis
18d5940bc6 Use a simple memory pool for benchmarks
In the test suite, a significant amount of time is spent in memory
allocations. A memory pool helps achieve more relevant results with
less iterations.
2017-12-16 13:07:15 +01:00
Frank Denis
ac8dffbecb Return -1 if the scalar is 0 in crypto_scalarmult_ed25519()
For consistency with _base()
2017-12-12 14:35:08 +01:00
Frank Denis
21c1a3160c Remove tests for deprecated functions 2017-12-11 23:22:34 +01:00
Frank Denis
cf59e049e7 Check reduced-round salsa variants in non-minimal mode 2017-12-11 20:11:27 +01:00
Frank Denis
bdca518edc Remove incorrect and useless cast 2017-12-11 19:54:10 +01:00
Frank Denis
99fa31a595 More tests 2017-12-06 14:08:00 +00:00
Frank Denis
609e42be75 One more test 2017-12-06 13:53:22 +00:00
Frank Denis
43fa5ecc49 Add some tests for reduced-rounds salsa20 2017-12-06 13:38:46 +00:00
Frank Denis
0b6370dd0a Always undef NDEBUG in tests 2017-12-06 12:17:57 +00:00
Frank Denis
625e313e74 Avoid an expression in a assert() with side effects 2017-12-06 12:16:37 +00:00
Frank Denis
e89c43edf6 secretstream: add a test for rekeying using TAG_REKEY 2017-12-06 11:45:47 +00:00
Frank Denis
22b65dc57c Add a call to sodium_stackzero() 2017-12-05 17:49:58 +00:00
Frank Denis
01072a2f6a More tests 2017-12-03 21:16:46 +01:00
Frank Denis
cdd7d5f37d Add explicit cast 2017-12-03 21:02:17 +01:00
Frank Denis
8ad6ffa9d6 More tests 2017-12-03 20:56:17 +01:00
Frank Denis
b6262d982f Don't even try to compile non-minimal code 2017-12-03 16:55:46 +01:00
Frank Denis
139cadc76d Skip tests 13&14 in minimal mode 2017-12-03 16:49:55 +01:00
Frank Denis
99fe9eb67f More misuse tests 2017-12-03 16:39:05 +01:00
Frank Denis
229dac07ee casts 2017-12-01 17:29:29 +01:00
Frank Denis
217a9330a4 More tests 2017-12-01 17:21:59 +01:00
Frank Denis
84047b703a More tests 2017-12-01 17:04:09 +01:00
Frank Denis
e44614505b Casts 2017-12-01 16:32:25 +01:00
Frank Denis
218dac349a Fix format string sign 2017-12-01 15:24:48 +01:00
Frank Denis
46e2a46490 secretstream test: provide additional data to lift ambiguity on what is being tested
Spotted by @emilbayes - Thanks!
2017-11-26 22:02:26 +01:00
Frank Denis
ee2403deba Check for RDRAND presence 2017-11-25 17:53:33 +01:00
Frank Denis
c190574cee x25519-ref10: reject low order points before the multiplication 2017-11-17 10:47:00 +01:00