diff --git a/crypto/fipsmodule/ml_dsa/ml_dsa_ref/poly.c b/crypto/fipsmodule/ml_dsa/ml_dsa_ref/poly.c index 456f7b5aa3..997e7d2e0b 100644 --- a/crypto/fipsmodule/ml_dsa/ml_dsa_ref/poly.c +++ b/crypto/fipsmodule/ml_dsa/ml_dsa_ref/poly.c @@ -372,19 +372,19 @@ static unsigned int rej_eta(ml_dsa_params *params, if (params->eta == 2) { if(t0 < 15) { t0 = t0 - (205*t0 >> 10)*5; - a[ctr++] = 2 - t0; + a[ctr++] = 2 - (int32_t)t0; } if(t1 < 15 && ctr < len) { t1 = t1 - (205*t1 >> 10)*5; - a[ctr++] = 2 - t1; + a[ctr++] = 2 - (int32_t)t1; } } else if (params->eta == 4) { if(t0 < 9) - a[ctr++] = 4 - t0; + a[ctr++] = 4 - (int32_t)t0; if(t1 < 9 && ctr < len) - a[ctr++] = 4 - t1; + a[ctr++] = 4 - (int32_t)t1; } } return ctr;