]> git.codecow.com Git - Monocypher.git/commit
Improved the test suite
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 16 Jun 2018 10:29:34 +0000 (12:29 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 16 Jun 2018 19:52:46 +0000 (21:52 +0200)
commit9469dba309872e58c733e679f39a03aa4719b8d4
treecdf078a0732dccec3b5ceb05263ab45366727a1f
parent1a780a869fdb4ef133594caecefe778f0495f207
Improved the test suite

The test suite has been trimmed down a little, and improved a bit.  The
main goal was to have the TIS interpreter to run the entire test suite
in less than 20 hours, so I (and others) could realistically run it on
each new release.

- We now have much less Argon2i test vectors.  Only those at block size
  boundaries have been kept (for instance, it is important that we test
  both below and above 512 blocks, and below and above 64 bytes hashes,
  to hit all code paths.

- X25519 test vectors have been cut in half.  We have official test
  vectors and the Monte Carlo test already, we don't need too many
  vectors.  The main advantage here is to reduce the size of the test
  vector header file.

- The tests for chacha20_set_ctr() explore the test space more
  efficiently.

- The comparison between crypto_argon2i() and crypto_argon2i_general()
  is no longer repeated 128 times.

- The overlap tests for Argon2i have been cut down, and the overlap
  space has been reduced to compensate (so we're still sure there will
  be lots of overlap).

- The incremental tests for Blake2b and SHA-512 were cut down to a
  number of iterations, and total message size, that is *not* a multiple
  of a block length, so tests can fail more reliably if the MIN() macro
  has an error.

- The roundtrip tests for EdDSA have now been cut down, and try several
  message sizes as well.

- The random tests for EdDSA (which are mostly meant to test what
  happens when the point is outside the curve), have beet cut down (from
  1000 to 100), and try several message sizes as well.
tests/gen/argon2i.c
tests/gen/x25519.c
tests/test.c