sphincs / sphincsplus

The SPHINCS+ reference code, accompanying the submission to NIST's Post-Quantum Cryptography project
https://sphincs.org
Other
131 stars 44 forks source link

32-bit compatibility #46

Open thomwiggers opened 1 year ago

thomwiggers commented 1 year ago

The implementation uses a lot of unsigned long long for sizes of buffers and assumes that it's the same size as the size_t data type: it's passed to e.g. memmove and memcpy a lot. But on 32-bit x86 at least, sizeof(size_t) < sizeof(unsigned long long). This can lead to a lot of compiler warnings.

It would probably clean up the source code a lot to switch over to stdint.h types and use stddef.h for size_t whenever relevant. I'm not preparing a PR for this right now, as there are some large PRs open, but I am posting this as an issue for future reference.