Sunday, January 23, 2011

Crypto codes: ElGamal public key cryptosystem

Algorithms from An Introduction to Mathematical Cryptography book.
Here, Bob sends an encrypted message to Alice using ElGamal public key cryptosystem.
Download code from here

Extended Euclidean algorithm
Matlab code for modular inverse:
[u,y,d] = gcd(x,p); 
y = mod(y,p);

No comments: