static BigInt ctSelectBigInt(BigInt a, BigInt b, bool choice) { final mask = choice ? BigInt.from(-1) : BigInt.zero; // 0 or -1 final s = a ^ (mask & (a ^ b)); assert(s == a || s == b); return s; }