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
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
64154fb9f5
Use RtlGenRandom() instead of CryptGenRandom() on Windows
2014-06-15 22:39:10 -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
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
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
42b2d5c8e7
Indent
2014-06-03 23:51:51 -07:00
Frank Denis
4c9a993225
Remove useless #include
2014-05-27 08:53:46 -07:00
Frank Denis
eca4b52911
Add extra braces for int128 initializers
2014-05-27 08:53:10 -07:00
Frank Denis
9981651750
aes128ctr: use an union to avoid breaking aliasing rules.
2014-05-26 15:36:16 -07:00
Frank Denis
c712feaae3
Avoid redefinition of be32enc() on NetBSD.
2014-05-26 00:12:02 -07: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
c565993885
Add crypto_box_seed_keypair like crypto_sign_seed_keypair
...
Uses sk = seed.
2014-05-23 10:25:45 +03:00
Frank Denis
5f847cb76c
Do not violate strict aliasing in int128_aes128ctr.c
2014-05-20 19:41:43 -07:00
Frank Denis
7da592b730
Use uint64_t for 64-bit types instead of unsigned long long
2014-05-20 19:35:16 -07:00
Frank Denis
a992ac5252
Expose low-level scryptsalsa208sha256()
2014-05-18 23:48:02 -07:00
Frank Denis
ddb48d3b1a
Install sodium/crypto_stream_chacha20.h
2014-05-15 21:14:36 -07:00
Frank Denis
7381983f8b
Preliminary chacha20 support
2014-05-15 13:27:15 -07:00
Frank Denis
a15eca1e4d
Compatibility macros for crypto_pwhash_scryptsalsa208sha256
2014-05-15 00:53:57 -07:00
Frank Denis
ee6412080c
Add temporary compat layer for scryptsalsa208sha256 transition
2014-05-15 00:09:15 -07:00
Frank Denis
bd05b7d292
Rename scryptxsalsa208sha256 to scryptsalsa208sha256
2014-05-15 00:01:16 -07:00
Frank Denis
184193d1c5
Kill implementation-specific macros
2014-05-13 13:47:13 -07:00
Frank Denis
f25d7aa4f1
Add an extra static assertion
2014-05-13 10:41:55 -07:00
Frank Denis
1e0eafc541
Fix inverted sse2/sse3 detection
2014-05-13 00:44:29 -07:00
Frank Denis
3026bd69f9
Disable old compatibility layer
2014-05-13 00:20:07 -07:00
Frank Denis
cdd79653f3
Remove unused macros
2014-05-13 00:01:58 -07:00
Frank Denis
291d4998be
Define crypto_*_primitive() for high-level functions only
2014-05-13 00:00:03 -07:00
Frank Denis
91d17f6be1
<stddef.h> is required in crypto_hash.h
2014-05-12 23:45:49 -07:00
Frank Denis
df427966e2
Move macro definitions close to their related function definition
2014-05-12 23:44:04 -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
37ed9bada9
Name parameters in all prototypes.
2014-05-12 22:04:03 -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
96ea56a471
Rename cpu_features global to _cpu_features
2014-05-12 10:30:52 -07:00
Frank Denis
fb99b23ef4
Make aes256 tables static
2014-05-12 10:26:20 -07:00