18 Commits

Author SHA1 Message Date
Jesper Louis Andersen
3f8979ce64 Introduce a test case for the extension code. 2015-02-22 14:52:39 +01:00
Jesper Louis Andersen
69051e1803 Correct an afternm bug in the test cases. 2015-02-22 14:38:26 +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
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
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
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
f64e62d16e Provide correctness test cases for the verification codes. 2014-11-25 14:10:24 +01:00
Jesper Louis Andersen
d3471348e2 Introduce negative testing.
Negative testing means we inject faulty data into the test now and then. When this happens, we make sure the SUT will
return some kind of badarg error for bad arguments. This means we should make sure things actually work out as they should.

As a side-effect, this can also be used to test for memory leaks. If run for a while, it makes sure there are no leaks in the code base,
and it probably also makes sure there are no ways to crash the server by any means of use of these NIFs. As such, it looks like the
NIFs are fairly stable.
2014-11-22 23:26:45 +01:00
Jesper Louis Andersen
c08f83a755 Implement cryptography for secret boxes. 2014-11-21 17:42:32 +01:00
Jesper Louis Andersen
ff5196b99f Implement crypto boxing/unboxing for public key cryptographic systems. 2014-11-21 13:40:47 +01:00
Jesper Louis Andersen
9a7f4c8d4e Initial checkin. 2014-11-18 23:16:49 +01:00