178 Commits

Author SHA1 Message Date
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
Jesper Louis Andersen
9830068304 Cook 0.14.0. v0.14.0 0.14.0 2015-08-14 22:11:45 +02:00
Jesper Louis Andersen
f444d1e4ac Fix box_seal/2 and box_seal_open/3.
* Call the functions `box_seal` and `box_seal_open` to match the libsodium names in module `enacl`.
* Fix a bug in the C NIF: We should fail if the input is `<` SEALBYTES but not on `<=` SEALBYTES. The latter made it impossible to encode empty messages.
* Add variants which run directly on the interpreter scheduler for small messages.

Also:

* Provide full EQC functions for the testing purposes. This generated around 13000 random test cases in a 5 minute run, all passing.# Please enter the commit message for your changes. Lines starting
2015-08-14 22:03:33 +02:00
Jesper Louis Andersen
4676328efa Make it a bit easier to use acme(1) with the code base. 2015-08-14 22:02:47 +02:00
Jesper Louis Andersen
92109eb354 Improve and verify sign_*_detached functions.
Provide non-dirty-scheduler variants for small strings, accurately bump
reductions for these strings.

While here, provide EQC test cases for the two functions.
2015-08-12 23:11:41 +02:00
Jesper Louis Andersen
7b64f3e52b Merge pull request #6 from reith/sealed-box-func
Expose Seal Box functions
2015-08-10 10:39:20 +02:00
Amir Ghassemi Nasr
233c924b70 correct enacl:seal_box_open return value 2015-08-09 17:24:12 +04:30
Amir Ghassemi Nasr
64c03a1425 added bindings for crypto_box_seal_open\' functions 2015-08-07 00:24:50 +04:30
Jesper Louis Andersen
ed3e31f26f Merge pull request #5 from plumlife/master
Implementation of detached signatures
2015-07-27 11:38:10 +02:00
Parnell Springmeyer
35515e465a Improvements re: suggestions from @jlouis. 2015-07-26 13:49:15 -05:00
Joel Stanley
7e7ac67fb3 Add bindings to the libsodium DSA operations 'crypto_sign_detached' and 'crypto_sign_verify_detached' 2015-07-26 08:00:48 -05:00
Jesper Louis Andersen
89e28feab8 Bump version to 0.13.0. v0.13.0 2015-05-11 18:25:31 +02:00
Jesper Louis Andersen
bec29dfbe1 Mark internal functions as static functions.
This quells a number of warnings in the library when compiling.
2015-05-11 17:25:11 +02:00
arpunk
a7fbfbd53d Use gmake for FreeBSD in the rebar pre_hook configuration 2015-05-06 02:56:51 -05:00
arpunk
7bf9f24259 Add missing include and lib directories 2015-05-06 02:50:41 -05:00
Jesper Louis Andersen
d559c87fa7 Merge pull request #2 from ahf/ed25519
Add Ed25519 API
2015-04-02 20:05:27 +02:00
Alexander Færøy
de0ce86473
Add Ed 25519 Utility API. 2015-04-02 18:43:58 +02:00
Alexander Færøy
b544a37a72
Fix warning: missing declaration for memcpy(). 2015-04-02 18:43:58 +02:00
Alexander Færøy
d34e3bfef1
Remove dot after @end. 2015-04-02 18:15:48 +02:00
Jesper Louis Andersen
2979503a7f Fix the missing priv directory. v0.12.1 2015-03-11 13:41:53 +01:00
Jesper Louis Andersen
4a523e3b0b Name correct Alex :) 2015-02-24 00:09:56 +01:00