hashes icon indicating copy to clipboard operation
hashes copied to clipboard

groestl: add AVX512/GFNI backend

Open robbie01 opened this issue 5 months ago • 2 comments

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.

robbie01 avatar Aug 11 '25 22:08 robbie01

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 avatar Aug 12 '25 01:08 newpavlov

@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.

robbie01 avatar Aug 12 '25 10:08 robbie01