test_crypto: add equix and hashx tests

This adds test vectors for the Equi-X proof of work algorithm and the
Hash-X function it's based on. The overall Equi-X test takes about
10 seconds to run on my machine, so it's in test_crypto_slow. The hashx
test still covers both the compiled and interpreted versions of the
hash function.

There aren't any official test vectors for Equi-X or for its particular
configuration of Hash-X, so I made some up based on the current
implementation.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
This commit is contained in:
Micah Elizabeth Scott
2023-03-09 15:11:28 -08:00
parent 92f83347f7
commit ffa8531fe0
3 changed files with 211 additions and 0 deletions
+5
View File
@@ -1,6 +1,11 @@
AM_CPPFLAGS += -I$(srcdir)/src/ext -Isrc/ext
# TODO: put this with other equix/hashx ext defs when those happen,
# and also add it to the autoconf config header. For now this is here
# just for test_crypto's benefit.
AM_CPPFLAGS += -DHASHX_SIZE=8
EXTRA_DIST += src/ext/ext.md
EXTHEADERS = \