2 from Crypto.Util.number import *
5 pkey = 892 # found through find_pkey() pkey^2 ≡ H (mod p) holds
8 s = 483 # found through find_s()
12 s = ((c - t) * pkey + p * k) / H
13 if(s == int(round(s))):
17 for i in range (1000):
22 print((c-t) % p == s * pkey % p)
23 print((c-t) * inverse(pkey,p) % p == s % p)
24 print((c-t) * inverse(pkey,p) % p)
26 print(math.gcd(pkey, p))