Commit Graph
415 Commits
Author SHA1 Message Date
Frank Denis 28d36d5207 Add memory locking to crypto_box_easy 2014-05-08 15:11:54 -07:00
Frank Denis 8a8463e4ac Plug memory leak on error path in the easy interfaces 2014-05-08 15:06:28 -07:00
Frank Denis fda08703fc salsa20/ref: zero sensitive data before returning 2014-05-08 11:12:04 -07:00
Jan Varho 3785fc5cd5 Check r and p against zero before dividing 2014-05-08 12:48:56 +03:00
Frank Denis dabd8fe426 <stdint.h> is not needed in crypto_pwhash_scryptxsalsa208sha256.h 2014-05-08 00:07:52 -07:00
Frank Denis 9b3219428e Reformat prototype, for consistency. 2014-05-08 00:06:06 -07:00
Frank Denis ee20da2cd7 Make it clear that crypto_sign_SECRETKEYBYTES actually stands for 2 * 32 2014-05-07 23:23:39 -07:00
Frank Denis dcf8869229 Sync salsa20/ref with supercop-20140425
But these changes may be reverted unless there is a solid reason for
adding these copies to the stack.
2014-05-07 21:39:43 -07:00
Frank Denis c81c5c1010 Sync stream_salsa20_amd64_xmm6.S with SUPERCOP 2014-04-25 2014-05-07 21:16:19 -07:00
Frank Denis 353f296429 Bring changes from SUPERCOP 2014-04-25 to ed25519/ref10 2014-05-07 21:01:31 -07:00
Frank Denis e7488dec44 Add crypto_pwhash_scryptxsalsa208sha256_str_verify() 2014-05-07 19:35:05 -07:00
Frank Denis fa05d907bf All the crypto_pwhash_* macros do not need to be exposed. 2014-05-07 15:30:04 -07:00
Frank Denis 4ef1a332d1 Add crypto_pwhash_scryptxsalsa208sha256_str() 2014-05-07 15:14:12 -07:00
Frank Denis a234e505f9 Saving %rbx may actually be required depending on the memory model. 2014-05-07 09:13:34 -07:00
Frank Denis 95d9a625db pwhash_scrypt(): do not allow outlen to be > SIZE_MAX 2014-05-07 00:27:18 -07:00
Frank Denis 2702aa1a24 Remove crypto_pwhash_scryptxsalsa208sha256_BYTES, support any output length.
A _BYTES macro will be more useful for the crypt()-like interface.
2014-05-07 00:24:58 -07:00
Frank Denis d1a1afb6e9 zeroing the on-stack output in escrypt_r() doesn't hurt. 2014-05-07 00:12:10 -07:00
Frank Denis 688e724dfb Reindent 2014-05-07 00:08:47 -07:00
Frank Denis 19da370866 Reindent crypto_scrypt-common.c 2014-05-07 00:01:20 -07:00
Frank Denis 7775a34c97 Add crypto_pwhash_scryptxsalsa208sha256() + output/salt len macros/functions. 2014-05-06 23:50:46 -07:00
Frank Denis a30f364ce1 Have sodium_munlock() zero the buffer before unlocking it. 2014-05-06 09:18:31 -07:00
Frank Denis b4e98c0253 Ensure that /dev/urandom is a char device. 2014-05-05 14:39:38 -07:00
Pieter Hintjens 94e9981357 Problem: utils.h not installed
Missing backslash in Makefile.am meant utils.h wasn't installed.
2014-05-03 08:37:50 +02:00
Frank Denis f8c49ac54f cpuid is not going to change more than ebx, even on x86_64 2014-05-02 21:16:32 -07:00
Frank Denis f601e6e471 Preserve (e|r)bx register when calling cpuid 2014-05-02 20:39:51 -07:00
Frank Denis b1c79463e0 Do not forget extern "C" wrappers. 2014-05-02 17:21:44 -07:00
Frank Denis cb4f3e4f06 Use SSE2 or portable scrypt implementation according to what the CPU supports. 2014-05-02 15:20:34 -07:00
Frank Denis 42e4ebe3e3 autoconf uses HAVE_*, but runtime_have_* sounds really awkward 2014-05-02 14:48:12 -07:00
Frank Denis cb8544715b Check for SSE2/SSE3/NEON support at runtime. 2014-05-02 14:40:39 -07:00
Frank Denis 3cefff9e52 Goodbye poly1305-53 and its genius fp wizardry. 2014-05-01 21:51:02 -07:00
Frank Denis ada7ebdf5d Get ready to say goodbye to the infamous poly1305-53 implementation.
Give room for optimized implementations instead.
2014-05-01 21:42:45 -07:00
Frank Denis 840b0f243d glibc requires #pragma GCC target("sse2") to use SSE2 instructions 2014-05-01 13:55:09 -07:00
Frank Denis 40b9d0fdc7 Fix mlock()/munlock() return value on Windows 2014-04-27 09:19:50 -07:00
Frank Denis 3cbff15e59 Expose size_t crypto_shorthash_siphash24_keybytes(void); 2014-04-26 16:39:43 -07:00
Frank Denis 2e0497afa6 <limits.h> is required for SIZE_MAX. Fixes Android build. 2014-04-24 23:05:16 -07:00
Frank Denis 8c2e0189ab Do not compile sse/pwhash_scryptxsalsa208sha256.c unless emmintrin.h is available. 2014-04-20 09:06:07 -07:00
Frank Denis 62d78ec154 Pointers for sodium_m[un]lock() do not have to be const 2014-04-17 22:10:18 -07:00
Frank Denis b5589d1855 <errno.h> is required in scrypt_platform.h 2014-04-17 22:06:32 -07:00
Frank Denis 7b07e38c66 Add sodium_mlock() and sodium_munlock() 2014-04-16 18:18:44 -07:00
Frank Denis f288d11910 Don't use compile-time assertions with sizeof(dynamic length). 2014-04-15 20:16:23 -07:00
Frank Denis 17f8953d3a size -> len, for consistency 2014-04-15 00:42:29 -07:00
Frank Denis 219db714cf Add sodium_hex2bin() 2014-04-15 00:39:14 -07:00
Frank Denis aec630132c Slightly rename args in sodium_bin2hex() for consistency 2014-04-15 00:21:26 -07:00
Frank Denis 99cf33bc8f Indent 2014-04-14 22:33:46 -07:00
Frank Denis 7a85ec9789 Directly use OpenBSD's arc4random() instead of opening /dev/urandom. 2014-04-14 22:01:10 -07:00
Frank Denis c7c4f95655 Indentation 2014-04-14 21:38:41 -07:00
Frank Denis 9f5a7ce70a hardcoded size -> sizeof 2014-04-14 21:37:42 -07:00
Frank Denis 99970e2411 Remove useless #define 2014-04-14 21:18:41 -07:00
Frank Denis 665859e302 Since auth_hmac_sha512256 is just truncated hmac_sha512, expose hmac_sha512 2014-04-14 21:14:59 -07:00
Frank Denis 2483af0384 Make hash_sha512 / hmac_sha512256 consistent with hash_sha256 / hmac_sha256 2014-04-14 20:42:37 -07:00