Frank Denis
efe53d118b
chachapoly1305 test: check output length
2014-06-26 08:56:17 -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
d983bbe860
zerocopy crypto_box_easy() and crypto_box_open_easy()
2014-06-25 21:42:33 -07:00
Frank Denis
865a0719fc
The easy interface doesn't require any memory allocations any more.
...
At least for crypto_secretbox. crypto_box will follow.
2014-06-25 20:21:48 -07:00
Frank Denis
b2a8367b2b
Zerocopy crypto_secretbox_open_easy()
2014-06-25 20:17:50 -07:00
Frank Denis
8e22264e85
zerocopy crypto_secretbox_easy()
2014-06-25 00:39:00 -07:00
Frank Denis
f08666b0c6
Add crypto_stream_salsa20_xor_ic() to set the initial counter value.
2014-06-24 22:16:55 -07:00
Frank Denis
e352e775e8
Update vs2010 & vs2013 solutions
2014-06-23 16:55:19 -07:00
Frank Denis
1ba2ff6a04
Update vs2012 solution
2014-06-23 16:53:14 -07:00
Frank Denis
6a3598187a
Update headers in the MSVC solution
2014-06-22 22:10:03 -07:00
Frank Denis
4687d2db77
Update MSVC solution
2014-06-22 21:59:36 -07:00
Frank Denis
957315035a
Use weak symbols to prevent LTO if this is an option.
...
Idea from Matthew Dempsky.
2014-06-20 21:11:53 -07:00
Frank Denis
c7418dfd58
zero the poly1305 state in crypto_secretbox_chacha20poly1305*
2014-06-20 16:28:00 -07:00
Frank Denis
bc24968993
Document ChaCha20Poly1305
2014-06-20 00:07:12 -07:00
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
9cba9c39e3
+ crypto_onetimeauth streaming interface
2014-06-19 20:32:37 -07:00
Frank Denis
4df5a1b404
+ poly1305 streaming interface (2)
2014-06-19 20:14:56 -07:00
Frank Denis
b6fbb0ca6a
+ poly1305 streaming interface
2014-06-19 20:04:48 -07:00
Frank Denis
ffdbac52ce
poly1305_state_internal_t alignment is fine; add intermediary void * cast.
2014-06-19 19:39:50 -07:00
Frank Denis
c914f6a1af
Remove implementation-specific header crypto_onetimeauth_poly1305_donna.h
...
Remove macro magic for poly1305_donna by the way
2014-06-19 19:26:40 -07:00
Frank Denis
47f409a0c8
Expose poly1305_context as crypto_onetimeauth_poly1305_state
2014-06-19 18:55:21 -07:00
Frank Denis
3ae2cb5c26
Indent
2014-06-19 18:45:56 -07:00
Frank Denis
b0f798aa66
+ crypto_stream_chacha20_xor_ic() to set the initial value of the block counter
2014-06-19 00:28:02 -07:00
Frank Denis
098bad385b
Disable memset_s test for now.
...
Targeting OSX < 10.9 with -macosx-version-min doesn't work as expected:
memset_s is detected as present even though it won't actually work on
OSX <= 10.8
2014-06-18 17:49:28 -07:00
Frank Denis
64154fb9f5
Use RtlGenRandom() instead of CryptGenRandom() on Windows
2014-06-15 22:39:10 -07:00
evoskuil
0c0705ed47
Debug symboils for VS static libs.
2014-06-14 19:44:32 -07:00
Frank Denis
18cabe2c14
Another Objective-C wrapper
2014-06-14 11:55:51 -07:00
Frank Denis
bc11c90bf5
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Avoid naming a function select() in order to avoid confusion with select(2)
Comment dead code generated by qhasm
Remove useless access() before open()
Add annotations for Coverity FPs
test/default/sign.c: make the test vectors static
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.
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-13 17:17:31 -07:00
Frank Denis
7b7e223d39
Do not allocate more memory than needed in the easy interfaces.
...
And compute m_boxed_len as (ZEROBYTES || message len) to match the way the
documentation describes the output.
2014-06-13 17:15:34 -07:00
Frank Denis
dfade241e7
Avoid naming a function select() in order to avoid confusion with select(2)
2014-06-09 19:29:08 -07:00
Frank Denis
9b3da167fd
Comment dead code generated by qhasm
2014-06-09 19:27:54 -07:00
Frank Denis
3acdfa99a6
Remove useless access() before open()
2014-06-09 19:27:54 -07:00
Frank Denis
befd9c257d
Add annotations for Coverity FPs
2014-06-09 19:27:54 -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
6aacecac60
Rename curve25519/ref10 files to avoid duplicate file names.
...
Sharing code between curve25519 and ed25519 would be way better, but
until then, having distinct file names is required for Cocoapods, and makes
things easier in Visual Studio.
2014-06-06 23:36:27 -07:00
Frank Denis
fee99c1b2e
Remove the ref curve25519 implementation from the tree.
2014-06-06 14:25:04 -07:00
Frank Denis
a0a3741ea3
Replace curve25519 ref implementation with latest ref10 from Supercop.
2014-06-06 08:42:19 -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
6145edc563
Revert "Make curve25519-donna-c64 handle non-canonical points like the ref implementation."
...
This reverts commit bd8cbd3175
.
Conflicts:
src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c
test/default/scalarmult7.c
test/default/scalarmult8.c
2014-06-06 08:19:49 -07:00
Frank Denis
c2290bbfaf
Do not suggest running anything but make install
with root privileges.
2014-06-05 22:17:11 -07:00
evoskuil
8f5c9df257
Update VS import props to fix delinking.
2014-06-04 01:24:24 -07:00
Frank Denis
42b2d5c8e7
Indent
2014-06-03 23:51:51 -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
Frank Denis
6afdc96783
Merge pull request #167 from truenull/master
...
Tarsnap test vectors tested on Windows
2014-06-03 22:53:47 -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