Frank Denis
5e89fc9303
Import secretbox_chacha20poly1305.exp
2014-06-19 23:07:20 -07:00
Frank Denis
bd1490a6cd
Add AEAD_CHACHA20_POLY1305
...
With a twist: in order to be consistent with the crypto_stream
interface, the tag has to come before the ciphertext.
2014-06-19 22:49:33 -07:00
Frank Denis
1fcb676aed
test/default/sign.c: make the test vectors static
2014-06-09 19:27:54 -07:00
Frank Denis
06e089ef6a
Make crypto_sign() test code more explicit.
...
crypto_sign() doesn't just need the secret key. The public key has to follow.
Which is why the test vectors are laid out in this order.
But this can confuse static analysis, as well as people looking at the test
in order to better understand how crypto_sign() works.
So, just copy the sk and the pk into a dedicated buffer, for clarity.
2014-06-09 19:27:49 -07:00
Frank Denis
8560366cd8
Disable the pwhash_scrypt_ll test that requires 1 Gb RAM.
...
This is way too much for many devices and for VPS users.
2014-06-07 10:16:03 -07:00
Frank Denis
2058eaea99
Revert bd8cbd3175
...
Go back to masking the high bit in curve25519 instead of processing the
key as a 256-bit value.
2014-06-06 08:22:11 -07:00
Frank Denis
e737c94271
More test/default/pwhash_scrypt_ll.c fixes
2014-06-03 23:48:25 -07:00
Frank Denis
f341a4c9a3
Make arguments match the format string in test/default/pwhash_scrypt_ll.c ...
2014-06-03 23:22:38 -07:00
Anders Johansson
1d4849465b
Change spaces to tab in Makefile.am after pwhash_scrypt_ll addition
2014-06-03 13:04:26 +02:00
Anders Johansson
e7e4ab514c
To comply with C89:
...
- Moved variable declarations to top of function
- Constant output buffer inside the function
Moved strlen calls from main to inside function to make code easier to read.
Also switched from fancy quotes to single quotes in expected output
2014-06-03 12:15:39 +02:00
Anders Johansson
e477e51323
Fix Travis g++ errors
2014-06-01 21:31:44 +02:00
Anders Johansson
d47d5d8623
Add test for Tarsnap testvectors to low-level scrypt interface
2014-06-01 20:58:20 +02:00
Jan Varho
9f52b0f0e9
Change crypto_box_seed_keypair to use SHA-512 of the seed
...
This makes it compatible with what js-nacl and racl do.
2014-05-25 19:13:04 -07:00
Jan Varho
f438116b6b
Test crypto_box_seed_keypair
2014-05-23 10:33:58 +03:00
Frank Denis
a517bf9f0f
One more chacha20 test
2014-05-15 15:26:44 -07:00
Frank Denis
0d9f25999a
+chacha20.exp
2014-05-15 13:35:56 -07:00
Frank Denis
7381983f8b
Preliminary chacha20 support
2014-05-15 13:27:15 -07:00
Frank Denis
bd05b7d292
Rename scryptxsalsa208sha256 to scryptsalsa208sha256
2014-05-15 00:01:16 -07:00
Frank Denis
62e37fbfe4
crypto_pwhash_scryptxsalsa208sha256_str() test vectors
2014-05-14 23:46:15 -07:00
Frank Denis
eca5267df9
crypto_pwhash_scryptxsalsa208sha256 test vectors
2014-05-14 23:22:11 -07:00
Frank Denis
84cceed1f6
Do not require crypto_sign_BYTES extra bytes for the message in crypto_sign_open()
...
This is a common source of confusion.
2014-05-12 22:54:05 -07:00
Frank Denis
0c63926ef1
Fix sign.c test, classic crypto_sign_open() confusion.
2014-05-12 21:43:33 -07:00
Frank Denis
30c1e13f2a
Switch opslimit and memlimit in pwhash, to be closer to PHC's proposed API.
2014-05-12 12:34:41 -07:00
Frank Denis
37d73684b8
More crypto_pwhash tests
2014-05-12 11:26:39 -07:00
Frank Denis
9383d59e21
It's totally fine for sodium_library_version_minor() to be 0.
2014-05-08 21:32:36 -07:00
Frank Denis
42d87bf926
The pwhash test requires a 32 bytes salt.
2014-05-08 20:39:14 -07:00
Frank Denis
e48b1e6b75
Remove extra puts() in pwhash test.
2014-05-08 19:09:43 -07:00
Frank Denis
299ff0ceb3
Add a minimal test for crypto_pwhash
2014-05-07 23:54:55 -07:00
Frank Denis
9d29f94ac2
Add overdue crypto_sign test
2014-05-07 23:23:13 -07:00
Frank Denis
01059444ee
Wait, what, printf(3) on Windows doesn't even support %zu? o_O
2014-04-17 22:15:09 -07:00
Frank Denis
219db714cf
Add sodium_hex2bin()
2014-04-15 00:39:14 -07:00
Frank Denis
8960e5ad77
Add tests for auth_hmac_sha512
2014-04-14 21:34:55 -07:00
Frank Denis
e2262de49c
Add a default value for TEST_SRCDIR
2014-04-14 15:52:55 -07:00
Frank Denis
aa88415338
Remove unused variables
2014-04-14 15:51:03 -07:00
Frank Denis
3f4a8f285d
Add a test for crypto_verify_*()
2014-04-08 14:36:09 -07:00
Frank Denis
aaa4dab74a
Add a simple test for the secretbox easy interface.
2013-12-31 18:46:10 +01:00
Frank Denis
e8509072a9
Add an easy interface to secretbox
2013-12-31 18:37:36 +01:00
Frank Denis
a29fcf90a6
Add a simple test for crypto_box_open_easy()
2013-12-31 18:37:36 +01:00
Frank Denis
02ec147a00
Add a crypto_box easy interface
2013-12-31 18:37:36 +01:00
Frank Denis
3fbbffc2c6
Check xmain() return code in tests.
2013-12-31 18:37:05 +01:00
Frank Denis
deaa893ce4
Add a test for blake2 with salt&personalization
2013-11-11 23:33:16 -08:00
Frank Denis
1ca05f6b16
Have sodium_memcmp(a,b,s) return -1 if a != b, document return value.
2013-10-30 06:47:13 -07:00
Frank Denis
d29dcf44ca
Tell people that we are running the test suite.
2013-10-21 20:11:56 -07:00
Frank Denis
21f5f9790f
If wintest.bat is run from srcdir, cd test/default
2013-10-21 20:07:05 -07:00
Frank Denis
f5e81693ee
Fix wintest.bat usage
2013-10-21 16:31:19 -07:00
Frank Denis
d996d14f1f
Import wintest.bat
2013-10-19 21:06:55 -07:00
Frank Denis
bd8cbd3175
Make curve25519-donna-c64 handle non-canonical points like the ref implementation.
2013-10-13 12:49:15 -07:00
Frank Denis
2c7aba48f3
Use arc4random() in tests if available.
2013-10-06 15:51:45 -07:00
Frank Denis
1a3786705e
Add a sodium_bin2hex utility function.
2013-07-07 23:38:14 -07:00
Frank Denis
43132738d2
Add a pre-js script for providing /dev/urandom to tests in Javascript.
...
Not plugged to the build system yet.
2013-07-07 22:04:13 -07:00