Commit Graph

307 Commits

Author SHA1 Message Date
Jesper Louis Andersen d67e047859 Merge branch 'master' of github.com:jlouis/enacl into master 2020-08-27 14:06:41 +02:00
Jesper Louis Andersen cbb06fc598 Merge pull request #51 from starbelly/fixup-enacl-nif-return
Ensure we never return 1 from sodium_init() onload
2020-08-27 14:06:07 +02:00
Bryan Paxton 0351de9882 add upgrade and unload handlers 2020-07-28 18:30:59 -05:00
Bryan Paxton e18f9b7337 Ensure we never return 1 from sodium_init() onload
sodium_init() will return 0 on success, -1 on failure, and 1 if sodium is
already loaded and initialized (which is not an error). In the case
where libsodium is already initialized and the system is restarted we
may return 1 from onload nif function resulting in a crash.

- change the call to sodium_init() to check for an error return (-1) and
  return -1 explicitly in this case, otherwise always return zero at the
  end of our onload function.
2020-07-26 15:09:53 -05:00
Jesper Louis Andersen b2c70ef6a3 v1.1.0 2020-06-09 13:37:05 +02:00
Jesper Louis Andersen 025b83a14b Prepare 1.1.0. 2020-06-09 13:35:43 +02:00
Jesper Louis Andersen 4b4ec373b1 Test pwhash in EQC. 2020-06-09 13:34:03 +02:00
Jesper Louis Andersen 7f7c667b28 Update the README a bit
The world-order is new, so update the README.
to reflect reality a bit more.
2020-06-09 12:27:47 +02:00
Jesper Louis Andersen 90be3aa2dd Use GCC 9.3.0 from nix 2020-06-09 12:17:23 +02:00
Jesper Louis Andersen 23bd40a4b3 Netpick the include path order 2020-06-09 12:16:59 +02:00
Jesper Louis Andersen 42fd03cde0 Update CONTRIBUTORS, CHANGELOG 2020-06-09 12:14:39 +02:00
Jesper Louis Andersen 9258d8b6ad Merge remote-tracking branch 'kuon/patch-2' 2020-06-09 12:11:13 +02:00
Jesper Louis Andersen 5ea33643da Merge remote-tracking branch 'kuon/patch-1' 2020-06-09 12:08:21 +02:00
Jesper Louis Andersen a45d3863e0 Merge pull request #48 from kuon/patch-0
Add pwhash_SALTBYTES/0
2020-06-09 11:56:18 +02:00
Jesper Louis Andersen 82cd5d0361 Merge pull request #45 from starbelly:patch-1
Move rebar3_hex into project_plugins
2020-06-09 11:54:18 +02:00
Nicolas goy 4775270d76 Basic KDF functions 2020-04-19 19:07:23 +02:00
Nicolas goy 00f895b488 Allow specifying algorithm for pwhash 2020-04-17 14:31:35 +02:00
Nicolas goy a001404877 Add pwhash_SALTBYTES/0 2020-04-17 13:52:33 +02:00
Bryan Paxton 812f05adcf Move rebar3_hex into project_plugins
This change will prevent users from having to download rebar3_hex and all of it's dependencies.
2020-03-25 23:07:55 -05:00
Jesper Louis Andersen 5f95ee314f Implement EQC for secretstream 2020-03-07 15:10:58 +01:00
Jesper Louis Andersen bde03dc557 Fix a dialyzer warning 2020-03-07 14:21:52 +01:00
Jesper Louis Andersen 061c3dfd65 Mention we have unit tests for secretstream 2020-03-07 12:26:20 +01:00
Jesper Louis Andersen ec3af40ef8 Simple secretstream CT test case 2020-03-07 12:24:31 +01:00
Jesper Louis Andersen 8361450745 Format; release resources
In the push path, release resources
in a stack fashion. This avoids releasing
a binary incorrectly.
2020-03-07 12:01:27 +01:00
Jesper Louis Andersen 67fe9c7863 Track we have added secretstream support 2020-03-07 11:33:11 +01:00
Jesper Louis Andersen 55b3670fe7 Merge pull request #44 from spscream/master
Add crypto_secretstream_* functions.
2020-03-07 11:31:30 +01:00
Alexander Malaev e32c923822 Add crypto_secretstream_* functions. 2020-03-02 10:28:45 +03:00
Jesper Louis Andersen 220ac6640a Fixup edoc compilation 2020-02-10 14:24:05 +01:00
Jesper Louis Andersen 218a6db09c More documentation. 2020-02-10 14:23:28 +01:00
Jesper Louis Andersen 2045ca8e09 Slightly better wording in documentation 2020-02-10 14:21:11 +01:00
Jesper Louis Andersen 8c13fc682e v1.0.0 2020-02-08 11:39:51 +01:00
Jesper Louis Andersen 24859776e4 Ready publishing of 1.0.0 2020-02-08 11:39:43 +01:00
Jesper Louis Andersen 1f7d553f75 Delete this sentence. It serves no purpose. 2020-02-06 16:18:25 +01:00
Jesper Louis Andersen 8e628a61fc Clean todo list 2020-02-06 16:06:21 +01:00
Jesper Louis Andersen a3f112607c Document the notion of finalization 2020-02-06 16:06:02 +01:00
Jesper Louis Andersen 96b883ceba generichash finalization
Make sure we finalize properly in
generichash and check the alive
state of objects. If they are not
alive, return the general finalized
error.
2020-02-06 16:04:23 +01:00
Jesper Louis Andersen d013a04a58 Manage the changelog. 2020-02-06 13:59:31 +01:00
Jesper Louis Andersen fd87b9da39 Fix a bug in sign_init/0
The code path was wrong in a lot
of cases in sign_init/0 so even if it
succeeded it would return a failure.

Fixed by cleaning up the code.
2020-02-06 13:57:49 +01:00
Jesper Louis Andersen cceef4530a Streamline naming
More changes before 1.0 with a
more direct naming scheme.
2020-02-06 13:57:07 +01:00
Jesper Louis Andersen 014d50cf47 Implement EQC for generic hashing, fix bug.
Turns out the interval we had in the
file were inverted and I was wrong
in an earlier commit. However, EQC
dutifully found the mistake, and it
is now corrected.
2020-02-06 12:18:47 +01:00
Jesper Louis Andersen f580f6525b Streamline _open style calls
Those now return {ok, Msg} or
{error, term()} so you are kind of
forced to match on them. This is
likely to help with correctnes.
2020-02-06 11:48:57 +01:00
Jesper Louis Andersen 7999d08e9d Streamlining of secret and _verify
The secret key API is now streamlined.

Also, all verify-type functions are
now returning boolean() values.
This makes the API consistent.
2020-02-06 11:12:32 +01:00
Jesper Louis Andersen 1cb2c3a2a2 Extend pwhashing with limits
In the EQC tests, we generate limits at random and verify things work.
2020-02-05 13:41:19 +01:00
Jesper Louis Andersen dea9ce62ed Rename constant to be in line with libsodium 2020-02-05 13:34:27 +01:00
Jesper Louis Andersen 41045fed85 Partially stream kx
Also while here, implement some EQC tests for it.
2020-02-05 13:16:35 +01:00
Jesper Louis Andersen 5d245797d2 Parallelize the ext tests 2020-02-05 13:15:54 +01:00
Jesper Louis Andersen c26aeee413 Use an exit condition 2020-02-05 12:10:02 +01:00
Jesper Louis Andersen 78621356ec Split extension functions away 2020-02-05 12:08:28 +01:00
Jesper Louis Andersen d06fff489d QuickCheck for randombytes
There are some new randombytes
functions. Implement these as EQC
properties.
2020-02-05 11:16:56 +01:00
Jesper Louis Andersen c7720e6ab8 Streamline the AEAD API 2020-02-05 10:56:18 +01:00