Frank Denis
8fb5918fb6
Add a test for siphashx24
2017-02-24 19:23:14 +01:00
Frank Denis
7f7e7235c5
Add a keygen function to all the primitives
2017-02-19 21:15:54 +01:00
Frank Denis
70c2796ae5
+ crypto_kdf high-level API
...
This is a common need, and people end up reimplementing HKDF.
So, add a crypto_kdf() API similiar to libhydrogen's. The later has a
higher limit for the output length using BLAKE2X if required.
We can implement the same strategy later in libsodium if needed.
2017-02-19 18:13:10 +01:00
Frank Denis
532ea6bd95
+ test for aead_xchacha20poly1305
2017-02-18 22:10:30 +01:00
Frank Denis
b209a7c0af
Add a test for HChaCha20
2017-02-12 22:28:35 +01:00
Frank Denis
79935dc918
test/pwhash_argon2i -> test/pwhash
2016-03-21 09:48:01 +01:00
Frank Denis
aafff07689
Add support for running the test suite with Valgrind
2016-03-06 01:35:06 +01:00
Frank Denis
7a95e921ac
Add tests for pwhash_argon2i
2015-12-29 17:12:23 +01:00
Frank Denis
14bf02af88
Rename the pwhash test as as pwhash_scrypt
2015-12-29 16:14:19 +01:00
Frank Denis
93295855cf
Add aes256gcm test vectors
2015-10-11 12:56:20 +02:00
James Robson
e119c3e502
Added .final and .nexe output files to CLEANFILES
2015-06-22 14:16:07 -05:00
James Robson
34a4931d9a
Initial patch for Chrome NaCl implementation
2015-06-22 13:02:21 -05:00
Frank Denis
575ce93058
+ crypto_box_seal()
2015-04-17 01:01:32 +02:00
Frank Denis
4724440492
quirks\windows\windows-quirks.h -> quirks\quirks.h
2015-01-23 10:35:20 +01:00
Frank Denis
f20ecbed94
Skip sodium_utils{2,3} tests when the target is Javascript
2015-01-15 11:12:58 +01:00
Frank Denis
61620d7e42
Make 'make check' actually run the tests on Emscripten.
2014-11-25 09:51:39 -08:00
Frank Denis
69e3674c29
Include the test pre.js script only for tests.
2014-11-24 17:19:55 -08:00
Frank Denis
b062a555da
scalarmult: check that the top bit is ignored
2014-09-18 21:27:49 -07:00
Frank Denis
0ec5a25c88
More tests for randombytes
2014-09-14 12:43:53 -07:00
Frank Denis
473e1718cc
Add sodium_{malloc,allocarray,free}() and sodium_mprotect_*()
...
ptr = sodium_malloc(size) returns a pointer from which exactly "size" bytes
can be accessed.
ptr = sodium_allocarray(count, size) allocates enough storage space for
"count" pointers or scalars of unit size "size".
In both cases, the region is immediately followed by a guard page.
As a result, any attempt to access a memory location after ptr[size - 1] will
immediately trigger a segmentation fault.
The allocated region is mlock()ed and filled with 0xd0 bytes.
A read-only page with the size, a guard page, as well as a canary are
placed before the returned pointer.
The canary is checked by sodium_free(); as a result, altering data right
before ptr is likely to cause sodium_free() to kill the process.
sodium_free() munlock()s the region and fills it with zeros before
actually calling free().
sodium_mprotect_noaccess(), sodium_mprotect_readonly() and
sodium_mprotect_readwrite() can be used to change the protection on the set
of allocated pages.
Reverting the protection to read+write is not required before calling
sodium_free().
2014-08-14 21:41:05 -07:00
Frank Denis
eae4add8de
Implement ed25519 -> curve25519 keys conversion
2014-08-05 13:32:25 -07:00
Frank Denis
7b0eeda1c6
Remove aes256estream.
...
AES-256 will be reintroduced, but not until we have a bitsliced implementation.
2014-08-05 00:57:10 -07:00
Frank Denis
f6519378b4
+ --enable-minimal to build a smaller library without less-used functions.
2014-07-09 20:24:04 -07:00
Frank Denis
a7410966ea
Rename secretbox_chacha20poly1305() -> aead_chacha20poly1305()
...
The tag is still at the end. This will be changed right after.
2014-06-26 08:48:13 -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
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
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
d47d5d8623
Add test for Tarsnap testvectors to low-level scrypt interface
2014-06-01 20:58:20 +02:00
Jan Varho
f438116b6b
Test crypto_box_seed_keypair
2014-05-23 10:33:58 +03:00
Frank Denis
7381983f8b
Preliminary chacha20 support
2014-05-15 13:27:15 -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
8960e5ad77
Add tests for auth_hmac_sha512
2014-04-14 21:34:55 -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
deaa893ce4
Add a test for blake2 with salt&personalization
2013-11-11 23:33:16 -08: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
f16186671d
Have "make distclean" remove *.res files
2013-04-27 16:42:37 -07:00
Frank Denis
404237d09b
Fix "make check" target when compiled in a dedicated directory.
2013-04-27 11:43:26 -07:00
Frank Denis
4628a747ed
Trim leading space in Makefile
2013-04-26 21:11:38 -07:00
Frank Denis
57a4552eb1
+ aes256estream
2013-04-26 21:06:34 -07:00
Frank Denis
4c31bb5ef1
Add tests for sodium_*() functions.
2013-04-25 22:37:15 -07:00
Frank Denis
e56415489c
Add some test vectors for the generichash streaming API
2013-04-21 17:32:09 -07:00
Frank Denis
d43309490a
Add preliminary tests for crypto_generichash (blake2)
2013-04-21 17:32:08 -07:00
Frank Denis
220ad48353
Make the tests compileable from a separate directory.
2013-04-21 17:32:07 -07:00
Frank Denis
5c946f9c61
Move tests to test/default and windows to quirks/windows.
...
test/default contains only tests using the default primitives
for a given operation. We need to add other tests as well.
2013-02-09 04:21:32 +08:00