makeHint static method

int makeHint(
  1. int z,
  2. int r,
  3. int gamma2
)

MakeHint – optimised form used by the reference implementation / noble / KATs. This is the version that appears after the sign-side transformation r0 += ct0.

Implementation

static int makeHint(int z, int r, int gamma2) {
  // z = the transformed low-bits value, r = HighBits(w)  (or 0 in the special case)
  if (z <= gamma2 ||
      z > MLDSAOperator.q - gamma2 ||
      (z == MLDSAOperator.q - gamma2 && r == 0)) {
    return 0;
  }
  return 1;
}