diff --git a/robot-detect b/robot-detect index 5e05f0f..0cf5226 100755 --- a/robot-detect +++ b/robot-detect @@ -366,7 +366,7 @@ while True: # find pairs r,s such that m*s % N = m*s-r*N is PKCS conforming # 2.a) if i == 1: - s = N // (3 * B) + s = -(-N // (3 * B)) cc = (int(gmpy2.powmod(s, e, N)) * c0) % N while not BleichenbacherOracle(cc): s += 1 @@ -385,7 +385,7 @@ while True: a, b = M.pop() M.add((a, b)) r = 2 * (b * s - 2 * B) // N - s = -(-(2 * B + r * N // b)) + s = -(-(2 * B + r * N) // b) cc = (int(gmpy2.powmod(s, e, N)) * c0) % N while not BleichenbacherOracle(cc): s += 1