425 CH 10 DH-ElGamal-ECC 2015-2016
425 CH 10 DH-ElGamal-ECC 2015-2016
Security
Chapter 10
Fifth Edition
by William Stallings
Man-in-the-Middle Attack
15.14
Man-in-the-Middle Attack
1. Darth prepares by creating two private / public keys
2. Alice transmits her public key to Bob
3. Darth intercepts this and transmits his first public key to Bob.
Darth also calculates a shared key with Alice
4. Bob receives the public key and calculates the shared key (with
Darth instead of Alice)
5. Bob transmits his public key to Alice
6. Darth intercepts this and transmits his second public key to
Alice. Darth calculates a shared key with Bob
7. Alice receives the key and calculates the shared key (with Darth
instead of Bob)
Darth can then intercept, decrypt, re-encrypt, forward all
messages between Alice & Bob
ElGamal Cryptography
• public-key cryptosystem related to D-H
• so uses exponentiation in a finite (Galois)
• with security based difficulty of computing
discrete logarithms, as in D-H
• each user (eg. A) generates their key
– chooses a secret key (number): 1 < xA < q
xA
– compute their public key: yA = a mod q
ElGamal Message Exchange
Public Key of Alice = YA , Private Key of Alice = XA
56 112 512
80 160 1024
112 224 2048
128 256 3072
192 384 7680
256 512 15360
Pseudorandom Number
Generation (PRNG) based on
Asymmetric Ciphers
asymmetric encryption algorithm produce
apparently random output
hence can be used to build a pseudorandom
number generator (PRNG)
much slower than symmetric algorithms
hence only use to generate a short
pseudorandom bit sequence (eg. key)
Micali-Schnorr PRNG using RSA
in ANSI X9.82 and ISO 18031
Zi = k least significant bits of encrypted value at ith step
Generation of Pseudo Random Numbers Using RSA