Commit Graph

28 Commits

Author SHA1 Message Date
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
Jesper Louis Andersen 772a97d3db Implement low level code for the authenticators. 2014-11-24 14:39:19 +01:00
Jesper Louis Andersen 101c16e34a Add low-level support for crypto_stream and crypto_stream_xor. 2014-11-24 14:24:03 +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 c074a4b186 If we fail to open the box, release the binary we allocate while doing so. 2014-11-19 23:05:32 +01:00
Jesper Louis Andersen ba0e5e535d Implement the NIF parts of handling the public key crypto boxes in the system. 2014-11-19 22:57:23 +01:00
Jesper Louis Andersen 1712872030 Ignore the files we don't want to look at anyway. 2014-11-18 23:38:38 +01:00
Jesper Louis Andersen 3365b3e5af Provide a way to get at the typical constants for the public key box. 2014-11-18 23:37:04 +01:00
Jesper Louis Andersen bb9179f401 Tune the README.md file a bit. 2014-11-18 23:22:41 +01:00
Jesper Louis Andersen 9a7f4c8d4e Initial checkin. 2014-11-18 23:16:49 +01:00