98 Commits

Author SHA1 Message Date
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
Jesper Louis Andersen
7ba5f9888f v0.12.0 - Add new Curve25519 extensions to the API
* Introduce Curve25519 handling.
* Update and bump README.md
* Add contributor file
v0.12.0
2015-02-22 15:05:40 +01:00
Jesper Louis Andersen
3f8979ce64 Introduce a test case for the extension code. 2015-02-22 14:52:39 +01:00
Jesper Louis Andersen
64832fc95d Merge remote-tracking branch 'ahf/talla' 2015-02-22 14:42:30 +01:00
Jesper Louis Andersen
69051e1803 Correct an afternm bug in the test cases. 2015-02-22 14:38:26 +01:00
Alexander Færøy
e408278d50
Move the high-level API to enacl_ext 2015-02-22 14:29:44 +01:00
Alexander Færøy
d61d363426
Zero out temporary secret key memory. 2015-02-22 13:26:11 +01:00
Alexander Færøy
ef36bb85c1
Add curve25519_public_key/1. 2015-02-21 23:08:07 +01:00
Alexander Færøy
4e66fc3b94
Add curve25519_keypair/0 and curve25519_shared/2. 2015-02-21 22:49:44 +01:00
Alexander Færøy
6de936899c
Use rebar3 for compilation. 2015-02-21 22:47:20 +01:00
Jesper Louis Andersen
50b0058335 Improve the documentation of the project.
Go over the README file, and improve its contents. Add a Usage/hints section
with some helpful hints on how to use the library in turn. Also while here, make
sure that `rebar doc` works as expected and fix every documentation bug in
the EDoc sections, so it compiles and works. Verify the documentation output
is nice-looking while at it.
2014-12-18 09:28:00 +01:00
Jesper Louis Andersen
2a23a16ed3 Add in tests for beforenm/afternm to the EQC model. 2014-12-18 08:48:05 +01:00
Jesper Louis Andersen
159e8f6750 Introduce precomputed keys API.
This patch implements beforenm/afternm calls from NaCl for `box` style
crypto. It's main advantage is way faster computations, since it avoids
recomputing in the elliptic curve for every message.

While here, bump the version to v0.11.0 as new functionality was added.
v0.11.0
2014-12-17 17:12:29 +01:00
Jesper Louis Andersen
f2da7b014b Update changelog. 2014-12-17 16:17:43 +01:00
Jesper Louis Andersen
fc0f535882 Introduce timing for precomputed values. 2014-12-17 16:17:12 +01:00
Jesper Louis Andersen
238907e2a7 Fix bug in box_open_afternm + Improve readability of C code.
If we write

	EXP != 0

and EXP is a very large term, it is hard to see what it gets checked against, so we rewrite it as

	0 != EXP

so we instanly see what we check against. While here, teset against 0 != crypto_box_afternm(…)
2014-12-17 16:15:29 +01:00
Jesper Louis Andersen
e456f4ea9b Introduce blocking variants. 2014-12-17 15:50:02 +01:00
Jesper Louis Andersen
e594146f67 Implement the beforenm/afternm calls at the NIF layer. 2014-12-17 12:46:54 +01:00
Jesper Louis Andersen
b6aee8365d Inject faults into iodata() values.
This further verifies the test cases and also the enacl API. By injecting
wrong data, we verify that given incorrect data will make the system fail
and error(badarg) all over the place.
2014-12-17 12:19:04 +01:00
Jesper Louis Andersen
b1ed21e71d Introduce iodata() in the EQC tests.
Introduce a type for iodata() in the EQC tests. Use this type throughout
the tests in order to make sure we can supply iodata() in all places where
we claim we can supply iodata().
2014-12-17 08:36:49 +01:00
Jesper Louis Andersen
797daa653b Fix a type specification.
When calling `stream_xor/3` it is possible to supply `iodata()` directly
and you don't have to convert to a binary first. Reflect this in the type
of the specification.
2014-12-17 08:35:50 +01:00
Jesper Louis Andersen
ea4558738a Fix typo in spec, unbreak compilation. 2014-12-16 16:59:30 +01:00
Jesper Louis Andersen
cf08e5446f Fix a type -spec. 2014-12-16 16:55:45 +01:00
Jesper Louis Andersen
ad663d5c9c Improve wording a bit in the requirements section. 2014-12-16 15:27:38 +01:00
Jesper Louis Andersen
45cc6a3fa4 Hello v0.10.2 v0.10.2 2014-12-16 15:24:15 +01:00
Jesper Louis Andersen
9b6a45a0c1 Improve documentation and write a changelog for 0.10.1
Thanks to David N. Welton.
2014-12-16 15:17:31 +01:00
Jesper Louis Andersen
574f731505 Fix an error in the timing code.
Luckily this has had no effect on timing in practice save for a small unmeasurable constant factor.

Thanks to the dialyzer for finding the problem.
2014-12-16 15:16:43 +01:00
Jesper Louis Andersen
541db5b5ee Use erlang:nif_error/1 to teach the dialyzer to ignore the errors.
Thanks to Anthony Ramine
2014-12-16 15:13:21 +01:00
Jesper Louis Andersen
e10b7c8cfe Fail compilation if the Erlang/OTP system has no dirty scheduler support. 2014-12-16 15:12:52 +01:00
Jesper Louis Andersen
23e535fcc2 Use better specifications. 2014-12-13 02:23:04 +01:00
Jesper Louis Andersen
943371d21a Hello v0.10.1 v0.10.1 2014-12-13 02:09:48 +01:00