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
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
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
dea9ce62ed
Rename constant to be in line with libsodium
2020-02-05 13:34:27 +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
e67619a403
Update the naming scheme of AEAD xchacha20...
...
Since this AEAD construction variant is an IETF variant, reflect
this in the names of the functions.
This streamlines the API with the libsodium API.
2020-01-22 19:41:58 +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
bdb4719f6d
Fix AEAD parameter order / naming.
...
The order of parameters were in the wrong order. Make them equal
to the official order of libsodium.
While here, rename NONCEBYTES to NPUBBYTES so it reflects the
underlying names as well.
2020-01-21 13:57:39 +01:00
Jesper Louis Andersen
d850b16d1b
Fix multi-part signatures
...
Remove the signstate wrapper as it is not needed anyore.
2020-01-20 15:52:38 +01:00
Jesper Louis Andersen
d7e83dd569
Track outlen inside the generichash wrapper
2020-01-17 16:24:51 +01:00
Jesper Louis Andersen
f43a730758
Merge branch 'multi-part-signatures' of github.com:hazy/enacl
2020-01-16 15:38:48 +01:00
Jesper Louis Andersen
3f284be0cb
Merge branch 'sign-seed-keypair' of github.com:termoose/enacl
2020-01-16 15:21:50 +01:00
Jesper Louis Andersen
6032b5839d
Provide documentation
2020-01-16 13:47:41 +01:00
Jesper Louis Andersen
e6cb85fb24
Merge branch 'master' of github.com:syfgkjasdkn/enacl
2020-01-16 13:45:31 +01:00
Jesper Louis Andersen
7f8e0a0e07
Merge branch 'xchacha20' of github.com:ECrownofFire/enacl
2020-01-16 13:15:54 +01:00
Jesper Louis Andersen
600020620b
Merge branch 'master' of github.com:ECrownofFire/enacl
2020-01-15 16:11:30 +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
Garry Hill
279c2c32c8
Add support for multi-part signatures
2019-11-20 12:11:21 +00:00
Ole Andre Birkedal
6f4a0c2521
Added bindings for crypto_sign_seed_keypair in libsodium
2019-06-15 14:29:15 +02:00
ECrownofFire
2b183e1974
Add support for aead_xchacha20poly1305
2018-11-25 11:30:34 -05:00
alsdiufgoaiwuegflweuvflasjkdhvlajhsdfg666272727asfgfdsagdlsafg
3442655c5b
add crypto_sign_ed25519_sk_to_pk
2018-11-22 13:04:24 +00:00
ECrownofFire
07bcd87294
Add choice of ops and mem limits to pwhash
2018-10-27 23:23:16 -04:00
ECrownofFire
d779071285
Add choice of ops and mem limits to pwhash_str
...
It natively checks atoms, which is kinda messy, but it avoids having to
export the libsodium pwhash constants, which is nice.
2018-10-27 23:22:55 -04:00
Jesper Louis Andersen
edd95498d1
Fix pwhash_str* functions.
...
The API for pwhash_str returns a cstring in the output buffer. These
are null terminated. However, we return the full buffer as a binary
back to Erlang. This means that we have a buffer with 0'es in the end.
The tests take this buffer and passes it back in as is. Hence all the
tests pass. However, it is conceivable that if we write said buffer to
disk somewhere, we are not going to write those 0's out.
When we then load the ASCII-armored Argon2 string into memory again,
it is not 0-terminated as a cstring should be, and this produces
errors all over the place.
The fix is twofold:
* Return the full buffer to Erlang, but use binary:split/2 to create a
subbinary with the relevant part.
* Add a 0 in the end of ASCII Argon2 string before passing it to
libsodium
Since we are looking at pwhashing, and Argon2, we expect the
computational problem to be memory bound. Thus, spending a bit more
work in memory is not going to have any considerable impact on the
speed of this system.
2018-05-21 15:21:09 +02:00
Jesper Louis Andersen
3b9bc848e9
Move functions around. Mark untested functionality.
...
A lot of people who pushed functions they missed have not pushed any
kind of test cases for them. To make sure we have test coverage, I've
marked the functions we have under test and the functions we are still
missing tests for.
2018-05-21 12:27:24 +02:00
Jesper Louis Andersen
8b8ceff4ef
Fix rebar3 edoc
compilation
2018-05-20 20:25:33 +02:00
Jesper Louis Andersen
fb7de2cbb4
Merge pull request #21 from aeternity/add_aead_chacha20poly1305
...
Add AEAD chacha20poly1305
2018-05-20 19:38:14 +02:00
Hans Svensson
2f50ba6289
Also expose crypto_curve25519_scalarmult_base
2018-03-05 15:33:17 +01:00
Hans Svensson
9dfbe8cc90
Expose AEAD ChaCha20 Poly1305 functionality
...
Note: We expose the modern IETF version but still name it plain
aead_chacha20poly1305.
2018-03-05 09:52:39 +01:00
daveed-al
97ad7a5452
pwhash_str doc update
2018-01-31 18:25:13 +08:00
Jesper Louis Andersen
c8403ab198
Merge pull request #19 from technion/indents
...
Fix mixed tabs and spaces. Fixes #12 .
2018-01-02 17:07:00 +01:00
Technion
9d2f90a5c5
Fix mixed tabs and spaces. Fixes #12 .
2017-12-31 05:02:18 +00:00
Technion
c6de481b2e
Changed -spec on generichash/2 and generichash/3.
...
Fixes #17 .
2017-12-31 02:40:22 +00:00
Venkatakumar Srinivasan
ba640b0659
Added generic hash NIF
2017-08-11 13:32:04 -05:00
Venkatakumar Srinivasan
43cae7c7ea
Implemented nif for crypto_pwhash()
2017-08-11 13:32:04 -05:00
Jesper Louis Andersen
fffe07e965
Reindent everything.
...
Indentation follows the standard emacs mode for Erlang code.
2017-03-19 19:28:39 +01:00
Alexander Malaev
2da2ba138f
Add kx_* functions from libsodium 1.0.12
2017-03-19 18:24:06 +03:00
Doug Huff
3f4b50dbe1
Squash some dialyzer warnings for constants.
2015-10-29 20:35:44 +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