Elgamal Encryption, Cybersecurity, Encryption, Cryptography.
r2=random.randrange(3, p) print (f"Message:\nm={M}") print (f"Bob's Public key: g={g}, Y={Y1}, p={p}\nBob's Private key: x={x1}, r1={r1}") print (f"\nAlice's Public key: g={g}, Y={Y2}, p={p}\nAlice's Private key: x={x2}, r2={r2}") c11=pow(g,r1,p) c21=(pow(Y1,r1,p)*m) % p c12=pow(g,r2,p)