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

Remove dead code in shake thash implementations #38

Closed bwesterb closed 2 years ago

bwesterb commented 2 years ago

SPX_N only takes values 16, 24 and 32 in SPHINCS+. The SPX_N==64 came from a similar implementation for XMSS.

bwesterb commented 2 years ago

I checked the test vectors for shake-a64 by hand. The others are covered by the CI.

sfluhrer commented 2 years ago

This is all code that the compiler optimizes out anyways (because SPX_N is a manifest constant). However, removing it does make the source simpler...

bwesterb commented 2 years ago

This is all code that the compiler optimizes out anyways (because SPX_N is a manifest constant). However, removing it does make the source simpler...

True — I just checked the tests out of an abundance of caution.