pq-crystals/kyber

Out of bound check in NTT/INTT

SherifElewaa opened this issue · 2 comments

Dear gregorseiler,

In ntt.c source code, there is out-of-boundary check inside ntt and intt functions. For example, in ntt function in line #68 integer j used in the for loop is defined but not initialized:

for(start = 0; start < 256; start = j + len)

As a result, this causes r[j + len] to go out-of-boundary somehow. Could you please comment on this?

Thanks,
Sherif

The statement start = j + len is executed at the end of the for-loop body
and by that time, the variable j is initialized.

OK, I see. Thanks!