Frank Denis
fc10e78580
Add a test for constants
2017-11-15 16:58:31 +01:00
Frank Denis
a60d877327
Add a test for crypto_scalarmult_ed25519
2017-11-15 16:57:29 +01:00
Frank Denis
7653df070c
Keep only the second test
2017-11-15 16:15:25 +01:00
Frank Denis
222ab9857c
Check that add/sub don't enforce the canonical form
2017-11-15 15:31:01 +01:00
Frank Denis
4fe7f88063
Re-merge previous test; add the correct prime
2017-11-15 15:26:41 +01:00
Frank Denis
d8c36842eb
Remove a test that doesn't make sense
2017-11-15 01:59:43 +01:00
Frank Denis
97e6f73230
Add a pretty obvious assertion
2017-11-15 01:48:28 +01:00
Frank Denis
3d8889560e
Export constants
2017-11-15 01:47:54 +01:00
Frank Denis
1e06b32f45
Add a couple more tests for ed25519_is_valid_point()
2017-11-15 01:44:55 +01:00
Frank Denis
63f7727a74
C++ compat
2017-11-15 01:37:33 +01:00
Frank Denis
1df2285362
Add a preliminary test for core_ed25519
2017-11-15 01:34:43 +01:00
Frank Denis
7e75ad4ca9
Remove unused var
2017-10-23 23:43:19 +02:00
Frank Denis
f54c6db981
sign_keygen(): don't hash the secret scalar in non-deterministic mode
2017-10-11 21:27:48 +02:00
Frank Denis
0dd8338b83
Add a compile-time switch to create non-deterministic signatures
2017-10-06 15:35:07 +02:00
Frank Denis
2a367074fe
Add actual performance API emulation for old browsers
2017-10-05 07:52:33 +02:00
Frank Denis
e784a3fb40
Add no-ops for very old browsers without the performance API
2017-10-05 01:46:02 +02:00
Frank Denis
37d9f09f5b
Round duration
2017-10-05 00:20:55 +02:00
Frank Denis
752c1fff2d
emscripten template: make the module global
2017-10-05 00:16:37 +02:00
Frank Denis
cc8cd391c9
Fix emscripten template
2017-10-05 00:11:40 +02:00
Frank Denis
93e39760b9
Wasm: add basic benchmark
...
Not really fair yet since the script isn't preloaded
2017-10-05 00:02:37 +02:00
Frank Denis
f0daa92f50
Remove index-wasm.html.tpl
2017-10-04 23:52:39 +02:00
Frank Denis
6a0e144899
Use less memory for the pwhash tests
2017-10-04 22:52:11 +02:00
Frank Denis
d3e20869af
crypto_pwhash_ALG_DEFAULT is now Argon2id
2017-10-01 12:12:13 +02:00
Frank Denis
2f51ed3397
Rename the test/pwhash.c -> test/pwhash_argon2i.c
2017-10-01 11:09:55 +02:00
Frank Denis
d49d7e8d4f
pwhash: don't enforce the same limits for argon2i and argon2id
...
Fixes #606
Also, keep enforcing a minimum number of iterations to create argon2i
hashes, but relax that restriction for verification, as it can be
useful to migrate from hashes made using other libraries.
2017-10-01 11:02:46 +02:00
Frank Denis
2542367c2d
secretstream: set the initial counter to 1
...
Avoids using the first block for two different purposes, and will be more
consistent with the AES-based version.
This breaks backwards compatibility, but better do it now that most distro are
still shipping < 1.0.14, that no applications seem to be already using that new
API, and that there will be an update to the library major due to the aes128ctr
removal.
2017-10-01 10:08:04 +02:00
Frank Denis
3e0b4dec6e
Add sodium_base64_encoded_len()
2017-09-21 11:25:09 +02:00
Frank Denis
18f0fff89e
More tests: verify that they key gets updated after the counter wraps
2017-09-20 17:10:10 +02:00
Frank Denis
ee1d5c96d8
Move the codecs tests to their own test file
2017-09-19 22:51:05 +02:00
Frank Denis
558355e566
Check if SIGABRT can be trapped multiple times in a row
2017-09-19 22:33:09 +02:00
Frank Denis
8ee67b1dd7
More tests
2017-09-19 22:19:50 +02:00
Frank Denis
1f72dec89d
More tests
2017-09-19 22:17:10 +02:00
Frank Denis
41dc933226
More tests
2017-09-19 22:08:31 +02:00
Frank Denis
aec433cecc
Additional check
2017-09-19 20:04:57 +02:00
Frank Denis
7423408cd3
Make the behavior of hex2bin() consistent with base642bin()
...
Return -1 on incomplete sequences and on complete sequences
with trailing, non-ignored characters if no pointers to store the
last parsed byte has been provided
2017-09-19 18:45:23 +02:00
Frank Denis
00660d79b9
secretstream test: don't pull twice if we don't test with AD
2017-09-19 17:32:15 +02:00
Frank Denis
3c8a7f17f0
Add tests for short, invalid unpadded base64 strings
2017-09-19 16:59:18 +02:00
Frank Denis
9209e89d96
More tests
2017-09-19 00:34:26 +02:00
Frank Denis
31e9a5541d
More tests
2017-09-18 23:57:29 +02:00
Frank Denis
525c21ed10
Tests
2017-09-18 23:29:58 +02:00
Frank Denis
1875980d33
More tests
2017-09-18 23:18:46 +02:00
Frank Denis
5b9680ead6
More tests
2017-09-18 23:13:50 +02:00
Frank Denis
e878bc141b
More keygen tests
2017-09-17 23:13:38 +02:00
Frank Denis
f244f658d6
int -> size_t
2017-09-17 23:13:27 +02:00
Frank Denis
9c53da4a6d
metamorphic tests for HMAC
2017-09-17 21:55:29 +02:00
Frank Denis
bd69a3083a
metamorphic tests for onetimeauth
2017-09-17 21:48:16 +02:00
Frank Denis
a7b75a2d7d
+ simple metamorphic tests for crypto_generichash()
...
This needs to be extended to other APIs with a streaming interface
2017-09-17 21:41:32 +02:00
Frank Denis
bfab44aa40
initbytes -> headerbytes for clarity
2017-09-16 23:21:28 +02:00
Frank Denis
19496bcc01
Don't try to access /usr/local on Travis CI
2017-09-15 13:08:14 +02:00
Frank Denis
ca43a12683
Old tcc versions miscompile while (++in[x])
...
So, let's just keep things readable, even for compilers.
2017-09-15 12:58:47 +02:00