* 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
Provide non-dirty-scheduler variants for small strings, accurately bump
reductions for these strings.
While here, provide EQC test cases for the two functions.
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.
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.
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(…)
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.
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().
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.