Commit Graph

952 Commits

Author SHA1 Message Date
Frank Denis
82ed2169b0 Make argon2i blocks allocation functions static 2015-12-30 17:30:59 +01:00
Frank Denis
ff32e8f34b argon2: memory usage is m_cost KiB, not 2^m_cost KiB 2015-12-30 00:10:57 +01:00
Frank Denis
dfa0ee2753 We don't need no external memory allocators 2015-12-30 00:09:16 +01:00
Frank Denis
1635f98638 Add sodium/crypto_pwhash.h to the distribution 2015-12-29 22:42:33 +01:00
Frank Denis
69cfab0522 We don't need the ability to use a custom allocator 2015-12-29 22:33:36 +01:00
Frank Denis
28ca446f73 argon2: don't dereference a pointer before testing it for NULL 2015-12-29 22:22:54 +01:00
Frank Denis
b5ed4cc34b Add high-level crypto_pwhash() API 2015-12-29 21:49:55 +01:00
Frank Denis
c7b9178d5a Consistent #include guards 2015-12-29 21:35:45 +01:00
Frank Denis
2bd822b1c9 Pasto 2015-12-29 19:13:48 +01:00
Frank Denis
6d9f2cae79 argon2: ensure that memory is cacheline aligned; use mmap(2) if possible 2015-12-29 19:00:52 +01:00
Frank Denis
9788147270 Require less indentation 2015-12-29 18:41:38 +01:00
Frank Denis
9ef45f8456 argon2: make blocks allocation indirect, keep the base address 2015-12-29 18:38:33 +01:00
Frank Denis
0ec2f464c8 Comment doesn't seem to be relevant any more 2015-12-29 17:53:13 +01:00
Frank Denis
96c37fc9a4 Indent 2015-12-29 17:51:00 +01:00
Frank Denis
bd44342a1e Remove unneeded extern "C" 2015-12-29 17:24:31 +01:00
Frank Denis
71056e2f75 Add missing header 2015-12-29 17:22:45 +01:00
Frank Denis
dfdf65c4f0 Add crypto_pwhash_argon2i_(memlimit|opslimit)_moderate()
Import missing crypto_pwhash_argon2i.h by the way
2015-12-29 16:07:47 +01:00
Frank Denis
387dd75e88 Require at least SSSE3 for optimized implementations 2015-12-29 15:34:16 +01:00
Frank Denis
a916ec93c1 crypto_pwhash_argon2i_*() 2015-12-29 13:29:24 +01:00
Frank Denis
da927a985f Argon2 bits - Not exposed in the API yet 2015-12-29 11:24:11 +01:00
Frank Denis
9abc0fdbd0 Back go to dev mode 2015-12-28 18:51:25 +01:00
Frank Denis
35b0264cdd Get ready for the xmas release 2015-12-25 11:58:08 +01:00
Frank Denis
61fbc8eb63 lcov exclusion 2015-12-25 02:12:09 +01:00
Frank Denis
d839d74c89 lcov exclusion 2015-12-25 02:09:12 +01:00
Frank Denis
2f4603ff7e lcov exclusion 2015-12-25 02:03:27 +01:00
Frank Denis
cdd45e413a lcov exclusion 2015-12-25 01:54:49 +01:00
Frank Denis
8ca2c79a19 Annotations 2015-12-23 20:40:32 +01:00
Frank Denis
82831cb7a6 Document constants 2015-12-22 12:19:32 +01:00
Frank Denis
7e1ea85f47 Remove dead code 2015-12-22 09:50:05 +01:00
Frank Denis
6996c383d3 Add warning 2015-12-20 17:29:33 +01:00
Frank Denis
764ceb7b7e Fix empty __attribute__ definition for !__GNUC__ 2015-12-20 17:20:30 +01:00
Frank Denis
c233490f06 Use memset() for fe_(0|1)()
This produces faster code with gcc.
constify precomputations by the way.
2015-12-19 01:51:20 +01:00
Frank Denis
00914500e0 Use stdint types instead of crypto_* 2015-12-18 00:13:24 +01:00
Frank Denis
2b21e18224 Finish replacing shifts on integers with multiplications 2015-12-18 00:03:47 +01:00
Frank Denis
09128b88c7 Remove redundant blank lines 2015-12-17 17:02:01 +01:00
Frank Denis
194ad15904 Explicitly call abort() if gettimeofday() doesn't succeed. 2015-12-17 09:45:02 +01:00
Frank Denis
c82925f2e6 Merge pull request #334 from bsilver8192/master
Various small cleanups
2015-12-17 09:38:31 +01:00
Frank Denis
c84ba1d17a Aliasing 2015-12-17 08:37:57 +01:00
Brian Silverman
18187ffab2 Don't rely on assert evaluating its argument 2015-12-16 22:54:04 -05:00
Frank Denis
03973542c7 Faster scalarmult_base() when using the ref10 implementation.
Use the Ed25519 scalar multiplication function followed by a conversion to
Montgomery coordinates to generate X25519 public keys.

Suggested a while ago by @CodesInChaos
2015-12-17 00:49:59 +01:00
Frank Denis
f430f3a936 Reorder to improve inlining 2015-12-16 16:01:00 +01:00
Frank Denis
6872237df9 Reorder functions to help with inlining 2015-12-16 15:53:13 +01:00
Frank Denis
b81f9cd436 Let the x25519 ref10 implementation use the core/curve25519/ref code
cswap can be a convenient operation to have in core later, but it is
not required yet.
2015-12-16 15:46:09 +01:00
Frank Denis
f9d982480b Move most of sign/ed25519/ref10 to core/curve25519/ref10 2015-12-16 15:25:14 +01:00
Frank Denis
5f4763ce74 Simplify AVX availabity detection, add support for Visual Studio 2015-12-15 10:41:43 +01:00
Frank Denis
2ee3db59e7 Use HAVE_AVX_ASM instead of HAVE_AMD64_ASM 2015-12-14 16:52:55 +01:00
Frank Denis
ab4bade488 Check the extended control register to see if AVX is actually usable 2015-12-14 16:45:44 +01:00
Frank Denis
53570303d0 Reduce diff between curve25519/ref10 and ed25519/ref10, add missing includes 2015-12-14 12:43:41 +01:00
Frank Denis
76daa01963 ref10: inline, constify 2015-12-11 06:42:59 +01:00
Frank Denis
04c7c3637e Don't refine SODIUM_C99 if it has already been defined 2015-12-11 00:57:47 +01:00