27 Commits

Author SHA1 Message Date
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
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
Jesper Louis Andersen
e4b35a7035 Flesh out changelog some more
This is a sort-of TODO list at the top of the list, but we use it to keep
track of what we need to do.
2020-01-22 22:23:23 +01:00
Jesper Louis Andersen
7f857115bb Add aead IETF constructions
Since the chacha20poly1305 constructions were the IETF variants,
we renamed those so they follow the official library better. While
here, we also fixed the argument order of the files.
2020-01-21 14:16:24 +01:00
Jesper Louis Andersen
bf6fb6cf7b Split the remaining operations 2020-01-20 15:31:44 +01:00
Jesper Louis Andersen
2ea36a7352 Start an "Upcoming changes" list
We want to fix a number of problems in the library. So we write down
what we are going to do in order to make it clearer to people.
2020-01-20 14:37:47 +01:00
Jesper Louis Andersen
f5b8a8eb3b Pull signing out to its own module 2020-01-19 17:38:42 +01:00
Jesper Louis Andersen
3ee5a94caf Split off AEAD functions to a separate file 2020-01-19 13:29:32 +01:00
Jesper Louis Andersen
0047af286f Provide a test suite for Generichash 2020-01-19 12:08:17 +01:00
Jesper Louis Andersen
d7e83dd569 Track outlen inside the generichash wrapper 2020-01-17 16:24:51 +01:00
Jesper Louis Andersen
df1b134f73 Track liveness stateReject updates to finalized generichash states. 2020-01-17 16:07:01 +01:00
Jesper Louis Andersen
463cae05d5 Bump for first additions 2020-01-17 16:03:16 +01:00
Jesper Louis Andersen
a25b9a2684 Bump CHANGELOG 2020-01-16 15:55:59 +01:00
Jesper Louis Andersen
0cfa88be32 Update changelog 2020-01-16 15:22:43 +01:00
Jesper Louis Andersen
03bf3b30a1 Update changelog 2020-01-16 13:48:35 +01:00
Jesper Louis Andersen
288d51ace7 Bump changelog 2020-01-16 13:42:19 +01:00
Jesper Louis Andersen
aaa5827613 Maintain CHANGELOG a bit 2020-01-15 16:17:44 +01:00
Jesper Louis Andersen
97ee4bbdcf Use randombytes_uint32
Better name. Says what you are getting.
2020-01-15 14:05:25 +01:00
Jesper Louis Andersen
f9d6034e84 Implement missing random functions* enacl:randombytes_int32/0* enacl:randombytes_uniform/1 2020-01-15 13:56:00 +01:00
Jesper Louis Andersen
f650c72b02 version bump 2018-05-21 17:52:25 +02:00
Jesper Louis Andersen
5210099e53 Update the changelog with the new stuff 2018-05-21 17:41:12 +02:00
Jesper Louis Andersen
2f1e1fa7b6 Provide a proper changelog 2018-05-21 13:45:59 +02:00