Skip to content
10 changes: 5 additions & 5 deletions src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ static void implKyberInverseNttJava(short[] poly) {
// Works in place, but also returns its (modified) input so that it can
// be used in expressions
private short[] mlKemInverseNTT(short[] poly) {
assert(poly.length == ML_KEM_N);
assert poly.length == ML_KEM_N;
implKyberInverseNtt(poly, montZetasForVectorInverseNttArr);
return poly;
}
Expand Down Expand Up @@ -1151,8 +1151,8 @@ static void implKyberNttMultJava(short[] result, short[] ntta, short[] nttb) {
// The result is a representation of the product still in the NTT domain.
// The coefficients in the result are in the range (-mlKem_q, mlKem_q).
private void nttMult(short[] result, short[] ntta, short[] nttb) {
assert (result.length == ML_KEM_N) && (ntta.length == ML_KEM_N &&
(nttb.length == ML_KEM_N));
assert (result.length == ML_KEM_N) && (ntta.length == ML_KEM_N) &&
(nttb.length == ML_KEM_N);
implKyberNttMult(result, ntta, nttb, montZetasForVectorNttMultArr);
}

Expand Down Expand Up @@ -1368,8 +1368,8 @@ private void twelve2Sixteen(byte[] condensed, int index,
if (remainder != 0) {
i++;
}
assert (((remainder != 0) && (remainder != 48)) ||
index + i * 96 > condensed.length);
assert ((remainder == 0) || (remainder == 48)) &&
(index + i * 96 <= condensed.length);
implKyber12To16(condensed, index, parsed, parsedLength);
}

Expand Down