Commit Graph

261 Commits

Author SHA1 Message Date
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
Jesper Louis Andersen f7dedf8236 Write tests for randombytes/1 and the scramble_block_16 extension. 2014-12-13 02:09:03 +01:00
Jesper Louis Andersen 5fec48c091 EQC Test improvements
* Generalize binary generation because it is used again and again.
* Use generalized binary generation in the hash functions since they are much faster as generators.
2014-12-13 02:00:52 +01:00
Jesper Louis Andersen b109ff7834 Provide a type specification of enacl:randombytes/1 2014-12-12 02:45:12 +01:00
Jesper Louis Andersen fd9f421621 Introduce enacl:randombytes/1. v0.10.0 2014-12-09 00:33:55 +01:00
Jesper Louis Andersen 6d37abd76a Remove a section that has *already* been implemented 2014-12-01 15:38:05 +01:00
Jesper Louis Andersen 2a5a62f3dd Add a missing word in the README.md file. 2014-12-01 14:14:38 +01:00
Jesper Louis Andersen f92732f512 I knew I had forgotten someone.
Rickard Green has been instrumental in Dirty Schedulers as well. Lets add him
(gentle poke by @vinoski).
2014-11-29 21:47:03 +01:00
Jesper Louis Andersen 2e97717558 Improve README.md wording. 2014-11-29 17:32:30 +01:00
Jesper Louis Andersen a03614c268 Add this under an MIT license. 2014-11-29 17:21:34 +01:00
Jesper Louis Andersen ee2624a544 Update the README.md file. v0.9.0 2014-11-29 17:15:58 +01:00
Jesper Louis Andersen 33a47e4fd4 Do not accept iolist data when binary data is what is forced by the input code. 2014-11-29 17:14:53 +01:00
Jesper Louis Andersen 90509026ce reduction handling, iodata() conversion. 2014-11-29 16:45:58 +01:00
Jesper Louis Andersen d9dbabf736 Improve ordering of the README file. 2014-11-29 16:12:21 +01:00
Jesper Louis Andersen 9ab3861d47 Add benchmarking script. 2014-11-29 16:06:49 +01:00
Jesper Louis Andersen 2724873f2f Add timing for all missing operations. 2014-11-29 15:49:13 +01:00
Jesper Louis Andersen d46ae1da16 Use on-scheduler variants of calls when message sizes are small. 2014-11-28 17:09:48 +01:00
Jesper Louis Andersen 281c3e8fbf Provide (scheduler) blocking variants of all the expensive calls. 2014-11-28 14:53:18 +01:00
Jesper Louis Andersen 2d39e2535e Properly initialize libsodium. 2014-11-28 14:41:20 +01:00
Jesper Louis Andersen addd22b31a More documentation and testing functions. 2014-11-28 14:41:06 +01:00
Jesper Louis Andersen 33612a083e Test enacl:sign_open/2 as well. 2014-11-28 13:31:02 +01:00
Jesper Louis Andersen 9cd38c7651 Introduce test cases for signing and partially for sign-opening. 2014-11-26 22:10:09 +01:00
Jesper Louis Andersen 57bb93683b Introduce tests for authentication verification and provide basis for signatures. 2014-11-26 20:05:59 +01:00
Jesper Louis Andersen ec0cc1afaa Handle the Auth tests. 2014-11-26 15:08:14 +01:00
Jesper Louis Andersen 6a707aef57 Write test cases for the streaming API. 2014-11-26 14:24:14 +01:00
Jesper Louis Andersen 6354ea4f69 Improve the return values for keypairs.
To avoid the common mistake of re-arranging keypairs, provide them in a map which
forces the programmer to unpack the map in order to obtain the keys. This in turn makes
it harder to swap the PK/SK pair around and mistakenly giving out the secret key to the world.
2014-11-25 15:52:58 +01:00
Jesper Louis Andersen 7c8272baa8 Keypair generation cannot fail.
Do not return an `ok` style tuple if key generation cannot fail.
2014-11-25 15:43:15 +01:00
Jesper Louis Andersen f205398958 Provide edoc documentation for the primitives. 2014-11-25 15:42:54 +01:00
Jesper Louis Andersen 87b803d3a5 Documentation, documentation, documentation. 2014-11-25 15:14:21 +01:00
Jesper Louis Andersen d37bce7eeb Documentation, documentation, documentation. 2014-11-25 15:08:31 +01:00
Jesper Louis Andersen 3cbff94709 Clean up: remove the application module which we don't need for a library.
This is not like the `crypto` subsystem, where a runner is needed to keep the
crypto system up and running. Rather, we can run without an application runner.
2014-11-25 14:12:54 +01:00
Jesper Louis Andersen f64e62d16e Provide correctness test cases for the verification codes. 2014-11-25 14:10:24 +01:00
Jesper Louis Andersen dc78d268e6 Move C level NIFs into the Erlang interface for these.
This enables the ability to call the C NIFs from Erlang.
2014-11-25 13:57:34 +01:00
Jesper Louis Andersen c33225cb77 Implement the low-level functions for signing. 2014-11-25 13:48:51 +01:00
Jesper Louis Andersen 30cb016078 Introduce low-level functions for handling string comparison. 2014-11-25 13:23:14 +01:00
Jesper Louis Andersen 265d8c7636 Handle signing keypair generation. 2014-11-24 19:30:04 +01:00
Jesper Louis Andersen 2324b73534 Implement the low-level codes for onetime authentication. 2014-11-24 15:17:02 +01:00
Jesper Louis Andersen 08297bb9c9 Rid ourselves of excess whitespace. 2014-11-24 15:16:54 +01:00