Log in to edit a copy.
Download.
Other published documents...
cryptography 1, exercise 10, assignment 2
159 days ago by Gijs_van_Enckevort
G = IntegerModRing(1013) g = G(3) h = G(224) powers = [ g^i for i in range(31) ] a = g^-31 j = 1 while not h*a^j in powers: j+= 1 i = powers.index(h*a^j) k = 31*j+i k
612
612
# to verify g^k == h
True
True