Lecture #8 Elgamal Encryption Algorithm
Lecture #8 Elgamal Encryption Algorithm
ALGORITHM
2
OBJECTIVES
ElGamal Encryption Scheme
Security of ElGamal Encryption
Differentiate Diffie-Hellman & Elgamal
Click to add picture
ELGAMAL ENCRYPTION
The ElGamal encryption system is
an asymmetric key encryption
algorithm for public-key cryptography which is
based on the Diffie–Hellman key exchange
PRIMITIVE ROOT
• A primitive root of a prime number p, is an
integer g such that the powers of g modulo p
generate all integers from 1 to p−1.
• In other words, g is a generator of the
multiplicative group of integers modulo p.
5
ELGAMAL ENCRYPTION
User A generates a private/public key pair as follows:
Any user B that has access to A’s public key can encrypt a
message as follows:
6
ELGAMAL ENCRYPTION
• User A recovers the key as well as the message as follows
SECURITY OF ELGAMAL
Trap-door function:
• s = gn mod p
• Easy: given g, n, & p, solve for s
• Hard: given s, g, & p, solve for n
Ephemeral key (k):
• A new key k is generated for each message
Replay Attacks Resistance:
• Unique k values prevent reuse of old ciphertexts
Man-In-The-Middle (MITM) Attacks:
• Attacker can still intercept and replace the public key
sent on the public channel, just like Diffie-Hellman!
11
WHAT TO DO?
Digital Certificates