296 Commits

Author SHA1 Message Date
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
Jesper Louis Andersen
b637ba307b Streamline generichash and pwhash 2020-02-04 17:50:56 +01:00
Jesper Louis Andersen
59b94439d1 Decide on an even better API 2020-02-04 14:00:02 +01:00
Jesper Louis Andersen
aa2c69529a Streamlines generichashThe multi-part hash API is nowreflecting the same crypto modulefunctions in style. This is easierto use for people, I believe. 2020-02-04 13:00:16 +01:00
Jesper Louis Andersen
71832cce4c Streamline sealed boxes 2020-02-04 12:44:47 +01:00
Jesper Louis Andersen
c791f602e9 Streamline returns in the public key API 2020-02-04 12:38:02 +01:00
Jesper Louis Andersen
2041cec2e8 Update the eqc suite.
Parameter order in
chacha20poly1305_ietf changed.

Fix this in the EQC tests.

While here, also do the Nonce
changes.
2020-02-03 14:58:52 +01:00
Jesper Louis Andersen
8ed8663dfe Correct ietf_decrypt
EQC Found a bug where parameters
where incorrectly passed. The CT
test suite passed, but randomized
tests found an error.
2020-02-03 14:57:42 +01:00
Jesper Louis Andersen
fc943a19c7 Go through the secret API as well 2020-01-24 22:17:24 +01:00
Jesper Louis Andersen
2b8b6224d8 Plug some memory leaks in the public API.
The problem is, like the other recent
patches, about properly releasing
binaries we have allocated but not
given to the VM for it to use.
2020-01-24 22:14:23 +01:00
Jesper Louis Andersen
4939f7bb23 Protect the signature ctx with a mutex
This is the same game as with the
generichash construction. We want
to protect it with a mutex so
different processes can safely do
work on the same resource.

While here, also move the _update
function onto the dirty scheduler.
It is by far the most expensive
operation, and why it wasn't there
in the first place is odd. This should
unblock the scheduler on long
sign-checks. It also move the
possible mutex block onto the
dirty scheduler thread, away from
the core schedulers, improving
latency in the system as a result.
2020-01-24 15:18:04 +01:00
Jesper Louis Andersen
7d8fdf69c0 Protect generichash by a mutex
While sodium is thread-safe, our
resources are not. Furthermore,
we might have an update call going
when someone decides to call
finalize and so on. It is not clever
to do so, but on the other hand
I want to protect against this.

While here, mark the mutexed
calls as dirty CPU. This avoids them
blocking the main scheduler and
only messes with the background
dirty threads, which is somewhat
more safe.

The consequence is that order
access to the resource is now
serialized. I don't think you should
do it, but it is now possible.
2020-01-24 14:48:21 +01:00