Frank Denis
4aba976d5f
Explicit casts
2017-09-15 01:00:43 +02:00
Frank Denis
15ee95c64c
Remove unused var
2017-09-15 00:57:44 +02:00
Frank Denis
70f66c9a6d
Check for avx/avx2/avx512f linkage
2017-09-14 00:05:37 +02:00
Frank Denis
390f865e35
Add tests for scrypt rehash
2017-09-13 18:47:55 +02:00
Frank Denis
2a2b85eeea
Add tests for crypto_pwhash_str_needs_rehash()
2017-09-13 18:40:14 +02:00
Frank Denis
979b21d67b
Remove extra semicolumns
2017-09-13 12:45:04 +02:00
Frank Denis
0af31aeb26
Fill the max output buffer size in sodium_bin2base64()
...
Unlike hex encoding, due to optional padding, computing the correct size is
not straightforward. Ensuring that the string ends with `\0` is fine, but
if the size is not exact, some unrelated data might be send around by the
application. So, zero it to be safe.
2017-08-31 19:32:14 +02:00
Frank Denis
fd4478288e
Test sodium_pad() with a NULL pointer
2017-08-25 15:24:46 +02:00
Frank Denis
f8e535a446
messagesbytes -> messagebytes
2017-08-25 15:12:35 +02:00
Frank Denis
aa20d2e86e
Add secretstream constants
2017-08-25 14:51:02 +02:00
Frank Denis
a0b9bc46e4
constcheck: grab a few more constants
2017-08-25 14:49:47 +02:00
Frank Denis
4c93d0391c
C++ compat
2017-08-17 23:27:20 +02:00
Frank Denis
0850e55808
Check that a zero blocksize returns -1
2017-08-17 21:00:02 +02:00
Frank Denis
a27c18d0e8
No need for two buffers in the padding test
2017-08-17 20:58:14 +02:00
Frank Denis
d5574a69fa
Complete sodium_pad/unpad() and add a couple tests
2017-08-17 20:54:20 +02:00
Frank Denis
6e8e0a93f9
Add a couple tests for crypto_secretstream_*()
2017-08-16 14:53:54 +02:00
Frank Denis
265bdcfe07
bin2hex & bin2base64: return a null size on error
...
This might prevent applications that don't properly check return codes
from reusing previous data.
2017-08-09 22:41:20 +02:00
Frank Denis
a6480aec44
b64 test: intentionally overestimate sizes
...
overflows will be caught by the guard page, if any
2017-08-09 18:03:56 +02:00
Frank Denis
74fd8fd1ce
C++ compat
2017-08-09 16:08:03 +02:00
Frank Denis
cdbb43f444
base64 tests
2017-08-09 15:56:58 +02:00
Frank Denis
8f0953b31f
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Bench: don't tie the printed result to the number of iterations
Make the number of iterations configurable; reduce the default
Add an interesting test case for a custom randombytes_uniform implementation
Add a benchmark mode
randombytes test: restore the salsa20-based rng at the end, for benchmarks
Indent
2017-08-05 20:58:23 +02:00
Frank Denis
a894ec93f2
Add crypto_pwhash_str_alg()
2017-08-05 20:56:59 +02:00
Frank Denis
cde31281d1
Bench: don't tie the printed result to the number of iterations
2017-08-04 23:30:30 +02:00
Frank Denis
6d59a5897d
Make the number of iterations configurable; reduce the default
2017-08-04 23:16:42 +02:00
Frank Denis
28a1e6886e
Add an interesting test case for a custom randombytes_uniform implementation
2017-08-04 23:13:29 +02:00
Frank Denis
5b4db091df
Add a benchmark mode
2017-08-04 23:08:22 +02:00
Frank Denis
8813c36fff
randombytes test: restore the salsa20-based rng at the end, for benchmarks
2017-08-04 23:01:16 +02:00
Frank Denis
a8cc1634f4
Indent
2017-08-04 22:59:06 +02:00
Frank Denis
544ce64000
Just a simple script to match constants with functions
2017-08-03 16:28:29 +02:00
Frank Denis
e1fa9cc90c
Add *_messagebytes_max() wrappers
2017-08-03 13:34:31 +02:00
Frank Denis
f02770b2ad
Revert "+ sodium_alloc_overhead()"
...
This reverts commit c5b61d8129
.
2017-08-02 14:26:56 +02:00
Frank Denis
c5b61d8129
+ sodium_alloc_overhead()
2017-08-02 12:34:56 +02:00
Frank Denis
774ec67e22
Repair sodium_core test
2017-07-30 18:22:53 +02:00
Frank Denis
8a14f5c167
Don't call sodium_misuse() in the sodium_core test for Javascript/wasm targets
2017-07-30 18:10:00 +02:00
Frank Denis
0ce03b6cea
misuse test: just return from main() on unsupported platforms
2017-07-30 17:54:54 +02:00
Frank Denis
180a89cb21
More tests for signatures
2017-07-29 22:42:05 +02:00
Frank Denis
b34b89ab37
secrebox: add a test with in/out buffers next to each other
2017-07-29 22:27:17 +02:00
Frank Denis
ff8bb6705a
More tests for scrypt
2017-07-29 22:01:13 +02:00
Frank Denis
a3f90d6020
Indent
2017-07-29 21:49:20 +02:00
Frank Denis
63d8a896fe
Test KX with a weak PK
2017-07-29 21:46:14 +02:00
Frank Denis
7ad9a46cb7
More tests
2017-07-29 21:43:18 +02:00
Frank Denis
a9a21a7dff
Test Ed->X conversion with x not being a square root
2017-07-29 21:36:02 +02:00
Frank Denis
982cde1a77
Test crypto_box_open_detached() with a weak PK
2017-07-29 21:34:28 +02:00
Frank Denis
c15173de1e
Turn a few calls with an insane message length into a sodium_misuse()
2017-07-29 18:37:55 +02:00
Frank Denis
8d91a32754
Add more tests for crypto_sign_ed25519_pk_to_curve25519()
2017-07-24 23:56:56 +02:00
Frank Denis
214fe473f1
Add an invalid key to the signature tests
2017-07-24 23:40:14 +02:00
Frank Denis
e1b0448205
Test crypto_secretbox_open_detached() with a NULL message pointer
2017-07-24 23:17:55 +02:00
Frank Denis
c90ddae75e
Use the right state type for the auth256 test
2017-07-24 23:04:23 +02:00
Frank Denis
51a0b96f1d
Test crypto_hmac_sha256_update() with empty chunks
2017-07-24 22:25:33 +02:00
Frank Denis
33d6908f9b
Test crypto_auth_hmacsha256_*()
2017-07-24 22:08:07 +02:00