248 Commits

Author SHA1 Message Date
Irina Guberman
43835abafe fix EQC fault calls 2017-08-16 23:52:31 -05:00
Irina Guberman
cfd654c275 Add eqc_mini_run and eqc_run directives to Makefile 2017-08-16 23:40:51 -05:00
Irina Guberman
fd796440db replace xrouter_clientd with xrouter_procd 2017-08-16 18:42:30 -05:00
Zane Beckwith
207ec85f8c Modify QuickCheck tests to be runnable to eqc-mini.
This involves:
- Removing calls to conjunction function
- Modifying fault* functions to _always_ return "Good" generator
- Commenting-out the eqc_parallelize parse_transform
2017-08-16 21:17:28 +00:00
Irina Guberman
05420f8a6b replace xrouter_clientd with xrouter_procd 2017-08-15 13:52:00 -05:00
Irina Guberman
b9f2895b4d configure for QC testing on http://quickcheck-ci.com 2017-08-15 13:47:46 -05:00
Irina Guberman
0e7ee5c6f0 configure for QC testing on http://quickcheck-ci.com 2017-08-15 13:40:45 -05:00
Zane Beckwith
bf4d61680c Change size_t variables to unsigned int's.
These variables are being initialized via calls to `enif_get_uint`,
so it's safer to declare them as unsigned int's rather than size_t's.
Their being used in calls to `enif_alloc_binary`, which takes a size_t
as its size.
However, the resulting ErlNifBinary keeps its size as an unsigned int,
so asking for a size that's an unsigned int should be safe.

This would be problematic in the case where sizeof(size_t) <
sizeof(unsigned), which would mean we're getting fewer bytes allocated
than expected.
Perhaps an explicit check for, for example, `hashSize > MAX_SIZE` would
be good here?
2017-08-14 17:01:50 +00:00
Irina Guberman
e524c2d5c8 Fix 32-bit arch warnings: replace enif_get_uint64 with enif_get_uint 2017-08-12 16:46:47 -05:00
Venkatakumar Srinivasan
ba640b0659 Added generic hash NIF 2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
36eedc6751 Pulled in latest version of enacl. Added nif's for password hashing functions 2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
c938d3c6e8 Fix to pwhash_str_verify() to accept only binary arguments 2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
ee0d800a9a Implemented nif for crypto_pwhash_str(), crypto_pwhash_str_verify() 2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
43cae7c7ea Implemented nif for crypto_pwhash() 2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
f395f65389 Removed experimental feature flag ERL_NIF_DIRTY_JOB_CPU_BOUND 2017-08-11 13:32:04 -05:00
Jesper Louis Andersen
61be95caad Bump version to 0.16.0 0.16.0 2017-03-25 23:25:25 +01:00
Jesper Louis Andersen
fffe07e965 Reindent everything.
Indentation follows the standard emacs mode for Erlang code.
2017-03-19 19:28:39 +01:00
Jesper Louis Andersen
ec60a63874 Update README.md with the new stuff which has been added since 0.15.0 2017-03-19 19:14:10 +01:00
Jesper Louis Andersen
2b8052a09a Reindent file to 80 columns. New random section.
From now, use the `rand` module of Erlang for all your random needs.
It is good enough now it uses an XORshift variant.
2017-03-19 19:06:25 +01:00
Jesper Louis Andersen
3ba654ab68 Merge pull request #13 from spscream/add_kx_crypto_functions
Add kx_* functions from libsodium 1.0.12
2017-03-19 16:47:50 +01:00
Alexander Malaev
2da2ba138f Add kx_* functions from libsodium 1.0.12 2017-03-19 18:24:06 +03:00
Jesper Louis Andersen
a708d0b11e Merge pull request #9 from jrmithdobbs/expose_more_libsodium_functions
Expose more libsodium functions
2016-06-23 22:04:21 +02:00
Jesper Louis Andersen
da64305ee5 Merge pull request #8 from gellerb/master
Updated http url in README.md to https
2016-06-21 19:09:31 +02:00
Geller Bedoya
32fb4ae148 Updated http url in README.md to https 2016-06-20 18:10:48 -07:00
Jesper Louis Andersen
2ee171bcbf The test macro for dirty schedulers are gone in 19.x Erlang/OTP
Remove it from the code, making the code able to compile.
2016-05-16 19:20:47 +02:00
Jesper Louis Andersen
8728c2cc10 Merge pull request #7 from kzemek/errorless_clean
Force remove artifacts in clean target.
2016-03-08 13:33:27 +01:00
Konrad Zemek
1789c6d3c8 Force remove artifacts in clean target. 2016-03-08 12:27:14 +01:00
Doug Huff
3f4b50dbe1 Squash some dialyzer warnings for constants. 2015-10-29 20:35:44 +00:00
Doug Huff
49256985b2 Fix building on netbsd. 2015-10-28 22:23:31 +00:00
Doug Huff
9849e7310a Add unsafe_memzero/1 2015-10-28 21:54:08 +00:00
Doug Huff
4d5524db61 Add chacha stream function access. 2015-10-28 21:53:42 +00:00
Doug Huff
ca005d32f9 Add access to siphash-2-4 (no dirty scheduler necessary). 2015-10-28 21:52:25 +00:00
Jesper Louis Andersen
03f93c4f7d Correct the DTrace script to the one we use. 0.15.0 2015-08-29 22:17:25 +02:00
Jesper Louis Andersen
01526484f2 Update the README file with version 0.15.0 2015-08-29 22:17:13 +02:00
Jesper Louis Andersen
b1c3e69fb5 Change randombytes/1 so it always executes on a DS
Investigation shows erratic behaviour of the CSPRNG. It may block at times
because it needs to go to the kernel and obtain more random information in
the system. Once this happens, you are blocked for quite a long time, but
we don't generally know when this happens. So just execute these directly
on the dirty scheduler.
2015-08-29 22:09:51 +02:00
Jesper Louis Andersen
2cad66ac2a Handle the ED25519 to Curve25519 conversion routines.
Make sure these either execute on the Dirty Scheduler or execute with bumping
reductions.
2015-08-29 22:08:34 +02:00
Jesper Louis Andersen
2e5163a934 Clean up things which are not needed anymore. 2015-08-29 21:50:16 +02:00
Jesper Louis Andersen
a59e983d9e Fix large detached signature verification. 2015-08-29 21:34:08 +02:00
Jesper Louis Andersen
1562eed9a3 Use DS-variants whenever it doesn't make sense.
Some operations are simply too expensive. Always run these on the dirty
scheduler.
2015-08-29 21:33:22 +02:00
Jesper Louis Andersen
66cf275152 Introduce a scalarmult variant which is safe from arguments swaps. 2015-08-29 21:32:48 +02:00
Jesper Louis Andersen
8c567be6a6 Also test large binaries, which forces the dirty scheduler variants. 2015-08-29 21:32:08 +02:00
Jesper Louis Andersen
a49c5a816c Introduce SunOS/Illumos support into the mix. 2015-08-29 21:31:44 +02:00
Jesper Louis Andersen
f05ba6e207 Introduce the DTrace scripts used to measure the performance in
the project.
2015-08-29 21:30:31 +02:00
Jesper Louis Andersen
8c31db792b Update the README.md file. 2015-08-29 21:28:27 +02:00
Jesper Louis Andersen
4e39bccab6 Introduce initial timing code for the library. 2015-08-29 21:24:09 +02:00
Jesper Louis Andersen
6bfa191f6b Do not create a new set of 0-bytes all the time.
Rather than creating a set of <<0,…,0>> every time and then throwing it away,
we now reuse a constant. They are small enough they are still small-binaries, but a
process can keep them around and use them whenever it needs to go to the
low-level area.
2015-08-29 20:54:37 +02:00
Jesper Louis Andersen
310bb3cc77 Remove the mention of the timing module.
We have a better way to handle this. So we are going to handle it in a better way, by
simply making the direct solution: Fix the crap by using DTrace.
2015-08-29 20:53:43 +02:00
Jesper Louis Andersen
a58ab2c193 Update the README.md file. 2015-08-23 21:55:30 +02:00
Jesper Louis Andersen
a135bce9d3 Simplify the code base, first round:
* Introduce enacl:verify/0 to verify the integrity of the library.
* Always run keypair functions on the dirty schedulers.
* Do not call NIFs when creating zerobytes. Avoid constructing new binary data, but reuse a constant.
* The box/box_open and box_seal/box_seal_open API is so expensive to call there is little overhead in
  running it on the DS always.
2015-08-23 21:44:28 +02:00
Jesper Louis Andersen
ce5f69f9f7 Ignore the _build directory. 2015-08-23 21:43:43 +02:00