groestl: add AVX512/GFNI backend
Last year, I wrote an AVX512/GFNI implementation of the "short" core for Groestl. (Ignore the "long" core code in g512.rs, it doesn't work correctly last I checked). Now that these intrinsics are stabilized, I would love to get this up to the standards of the project and contribute it as an optimized backend.
Sounds interesting. Feel free to open a PR. But I don't think we should use (__m512i, __m512i) for the hash state. Instead we should keep [u64; COLS], use unaligned loads, and change the compress function to operate over slice of blocks instead of one block at a time.
@newpavlov Exactly the kind of feedback I was looking for. I’ll start hashing out a PR. Is there any sort of project-wide standard for introducing selectable backends? I understand that ad-hoc macros seem to be used throughout RustCrypto.