def publickey(g,a,p): astar=pow(g,a,p) return astar
# compute the superkey x given the public key of Bob and the private key of Alice def superkey(bstar,a,p): x=pow(bstar,a,p) return x
encrypted=(t+x)%p
decrypted=(encrypted-x)%p
Copyright: © 2017-2019 by the Regents of the University
of Minnesota
Department of Computer Science and
Engineering. All rights reserved.
Comments to: Maria Gini