-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kyber Ref dead code ? #74
Comments
I think you are right that this is dead code in the 'standard' branch. Tagging @cryptojedi @gregorseiler. In the Kyber 'main' branch there is the "90s" version where XOF_BLOCKBYTES is 64 and GEN_MATRIX_NBLOCKS is 8. |
I agree that it's dead code, because the block size of SHAKE-128 is a multiple of 3. I'm not sure how I feel about removing it, though. If we do, we should have a #if around that function |
@cryptojedi is there a fix planned for this ? |
This is now changed in the "standard" branch. |
Hello all,
I was analyzing Kyber768 ref code and found a possible deadcode.
Can this line be reached : https://github.com/pq-crystals/kyber/blob/main/ref/indcpa.c#L185 ?
GEN_MATRIX_NBLOCKS is 3 & XOF_BLOCKBYTES is168 (also multiple of 3) that makes off ( @ https://github.com/pq-crystals/kyber/blob/main/ref/indcpa.c#L183) always 0.
---EDIT---
The same is applicable for Dilithium as well : https://github.com/pq-crystals/dilithium/blob/master/ref/poly.c#L360
Thanks.
The text was updated successfully, but these errors were encountered: