INNER CODE UNIT · Python

h

rkm0959/Inequality_Solving_with_CVP · Example Challenge 6 - GoogleCTF 2021 - H1/solve_challenge_6.py:148

	h = u2 - u1 % mod
	hsqr = h * h % mod
	hcube = hsqr * h % mod
	r = s2 - s1 % mod
	t = u1 * hsqr % mod
	x3 = (r * r - hcube - 2 * t) % mod
	y3 = (r * (t - x3) - s1 * hcube) % mod
	z3 = h * z1 * z2 % mod
	return x3, y3, z3

def Multiply(p, x):
	if p == INF:
		return p
	res = INF
	while x:
		x, r = divmod(x, 2)
		if r:
			res = Add(res, p)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…