VAMPIRE |
eBACS: ECRYPT Benchmarking of Cryptographic Systems |
ECRYPT II |
---|
General information: | Introduction | eBASH | eBASC | eBAEAD | eBATS | SUPERCOP | XBX | Computers | Arch |
---|
How to submit new software: | Tips | hash | stream | aead | dh | kem | encrypt | sign |
---|
List of primitives measured: | lwc | sha3 | hash | stream | lwc | caesar | aead | dh | kem | encrypt | sign |
---|
Measurements: | lwc | sha3 | hash | stream | lwc | caesar | aead | dh | kem | encrypt | sign |
---|
List of subroutines: | verify | decode | encode | sort | core | hashblocks | xof | scalarmult |
---|
There is a separate page (SHA-3 excerpt) showing the hash functions submitted to eBASH so far, and another page (SHA-3 excerpt) reporting measurements of those functions.
The top-level directory name crypto_hash is required; it distinguishes hashing from other operations benchmarked by SUPERCOP, such as crypto_stream and crypto_sign.
The second-level directory name md7 should be a lowercase version of your hash-function name. Please omit dashes, dots, slashes, and other punctuation marks; the directory name should consist solely of digits (0123456789) and lowercase ASCII letters (abcdefghijklmnopqrstuvwxyz).
Different hash functions must be placed into different second-level directories, even if they are part of the same "family" of hash functions. For example, crypto_hash/sha224 is separate from crypto_hash/sha256. One submission tarball can include several hash functions. Directory names may be changed by the eBASH managers to resolve conflicts or confusion.
The third-level directory name ref is up to you. Different implementations must be placed into different third-level directories. You can use subdirectories here; for example, crypto_hash/md7/ref might be a reference implementation, crypto_hash/md7/smith/little might be John Smith's little-endian implementation, and crypto_hash/md7/smith/sse3 might be John Smith's SSE3-optimized implementation. One submission tarball can include several implementations.
After choosing the implementation name crypto_hash/md7/ref, create a directory by that name. Inside the crypto_hash/md7/ref directory, create a file named api.h with one line
#define CRYPTO_BYTES 64indicating that your software produces a 64-byte hash output.
Next, inside the crypto_hash/md7/ref directory, create a file named hash.c that defines a crypto_hash function:
#include "crypto_hash.h" int crypto_hash( unsigned char *out, const unsigned char *in, unsigned long long inlen ) { ... ... the code for your MD7 implementation goes here ... return 0; }Your function must have exactly the prototype shown here: first an unsigned char pointer for the output, then a const unsigned char pointer for the input, then an unsigned long long for the number of bytes of input. Your function must return 0 to indicate success, or a negative number to indicate failure (e.g., out of memory).
You can use names other than hash.c. You can split your code across several files *.c defining various auxiliary functions; the files will be automatically compiled together. You must include crypto_hash.h for any file referring to the crypto_hash function. The file crypto_hash.h is not something for you to write or submit; it is created automatically by SUPERCOP. See the SUPERCOP tips for more advice and options.
Finally, create a tarball such as md7-ref-3.01a.tar.gz that contains your crypto_hash/md7/ref/api.h, crypto_hash/md7/ref/hash.c, etc. Put the tarball on the web, and send the URL to the eBACS/eBATS/eBASC/eBASH mailing list with a note requesting inclusion in SUPERCOP and subsequent benchmarking.