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.
7 years ago
Frank Denis
a6480aec44
b64 test: intentionally overestimate sizes
overflows will be caught by the guard page, if any
7 years ago
Frank Denis
74fd8fd1ce
C++ compat
7 years ago
Frank Denis
cdbb43f444
base64 tests
7 years ago
Frank Denis
a894ec93f2
Add crypto_pwhash_str_alg()
7 years ago
Frank Denis
cde31281d1
Bench: don't tie the printed result to the number of iterations
7 years ago
Frank Denis
6d59a5897d
Make the number of iterations configurable; reduce the default
7 years ago
Frank Denis
28a1e6886e
Add an interesting test case for a custom randombytes_uniform implementation
7 years ago
Frank Denis
5b4db091df
Add a benchmark mode
7 years ago
Frank Denis
8813c36fff
randombytes test: restore the salsa20-based rng at the end, for benchmarks
7 years ago
Frank Denis
a8cc1634f4
Indent
7 years ago
Frank Denis
544ce64000
Just a simple script to match constants with functions
7 years ago
Frank Denis
e1fa9cc90c
Add *_messagebytes_max() wrappers
7 years ago
Frank Denis
f02770b2ad
Revert "+ sodium_alloc_overhead()"
This reverts commit c5b61d8129
.
7 years ago
Frank Denis
c5b61d8129
+ sodium_alloc_overhead()
7 years ago
Frank Denis
774ec67e22
Repair sodium_core test
7 years ago
Frank Denis
8a14f5c167
Don't call sodium_misuse() in the sodium_core test for Javascript/wasm targets
7 years ago
Frank Denis
0ce03b6cea
misuse test: just return from main() on unsupported platforms
7 years ago
Frank Denis
180a89cb21
More tests for signatures
7 years ago
Frank Denis
b34b89ab37
secrebox: add a test with in/out buffers next to each other
7 years ago
Frank Denis
ff8bb6705a
More tests for scrypt
7 years ago
Frank Denis
a3f90d6020
Indent
7 years ago
Frank Denis
63d8a896fe
Test KX with a weak PK
7 years ago
Frank Denis
7ad9a46cb7
More tests
7 years ago
Frank Denis
a9a21a7dff
Test Ed->X conversion with x not being a square root
7 years ago
Frank Denis
982cde1a77
Test crypto_box_open_detached() with a weak PK
7 years ago
Frank Denis
c15173de1e
Turn a few calls with an insane message length into a sodium_misuse()
7 years ago
Frank Denis
8d91a32754
Add more tests for crypto_sign_ed25519_pk_to_curve25519()
7 years ago
Frank Denis
214fe473f1
Add an invalid key to the signature tests
7 years ago
Frank Denis
e1b0448205
Test crypto_secretbox_open_detached() with a NULL message pointer
7 years ago
Frank Denis
c90ddae75e
Use the right state type for the auth256 test
7 years ago
Frank Denis
51a0b96f1d
Test crypto_hmac_sha256_update() with empty chunks
7 years ago
Frank Denis
33d6908f9b
Test crypto_auth_hmacsha256_*()
7 years ago
Frank Denis
f92c82537b
More tests
7 years ago
Frank Denis
b57f9668fc
More tests
7 years ago
Frank Denis
8b9b6a54be
Remove error string from sodium_misuse()
Returning the name of an internal function to bindings is useless.
They need way more context to recover from these errors, and
their own backtrace will be way more useful for diagnostics.
7 years ago
Frank Denis
63cbad7506
Visual Studio doesn't like abort() chains
Let's limit this test to systems this has been tested on for the
time being.
7 years ago
Frank Denis
9df008a786
Add some invalid base64 strings to pwhash_str_verify() tests
7 years ago
Frank Denis
5d56821d3d
More tests, and start testing misuse cases
7 years ago
Frank Denis
0e8d7c9268
Implement sodium_set_misuse_handler()
7 years ago
Frank Denis
9def4d9a8a
Add tests for crypto_kx_*() when a single key is required
7 years ago
Frank Denis
608e103e45
Finish the Argon2id tests
7 years ago
Frank Denis
ff615b270a
Fix the AES test on error path
7 years ago
Frank Denis
7cfbb5922b
Dont expect EFBIG to be returned if a requested allocation is too large
Some environments return funny things such as "function not implemented",
EINVAL or "permission denied" instead.
So, don't assume anything.
7 years ago
Frank Denis
28e32dd5a2
Remove scrypt from minimal builds
7 years ago
Frank Denis
f586752afe
+ Argon2id tests
7 years ago
Frank Denis
7334060f43
Add a workaround for old asan versions (CentOS 7)
7 years ago
Frank Denis
c3045e2cb0
Check that SIGSEGV handlers work
Tools such as ASAN may trap violations instead of our handlers,
making the sodium_utils{2,3} test fail.
This has been documented for a long time, but it's probably better
to detect this and ignore tests depending on working signal handlers.
7 years ago
Frank Denis
efb097d957
Consistency
7 years ago
Frank Denis
b28c7bcad9
Unbreak NaCl tests (parse error near '}')
7 years ago