56 Commits

Author SHA1 Message Date
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