
Week 9: 2
05-2023 NT219–Cryptography
Outline
Why asymmetric cryptography?
Factoring Based Cryptography (P1)
RSA
Rabin
Logarithm Based Cryptography (P2)
Elliptic Curve Cryptography (P3)
Some advanced cryptography system
(quantum resistance)

Week 9: 3
05-2023 NT219–Cryptography
ElGamal cipher
ElGamal parameters
Large prime number
Multiplicative group
𝐺=
⟨
𝑔
⟩
=ℤ
𝑝
¿0}={1,2, … , 𝑝−1}
Secret key:
Public key:
Key generation (

Week 9: 4
05-2023 NT219–Cryptography
ElGamal cipher
Encryption message (using public key )
•Choose a random number
•Compute ;
•Computer
•Output cipher message
Decryption (using secret key )
•Compute ;
•Computer
•Output message

Week 9: 5
05-2023 NT219–Cryptography
ElGamal cipher
?private
key
public
key public
key
AB
(𝑃 𝑅
𝐵
=𝑥
𝐵
,𝑃 𝑈
𝐵
=h
𝐵
=𝑔
𝑥
𝐵
,𝑝)
Input:
Select a random number
Compute:
(𝐶¿¿1,𝐶
2
)¿
Compute:
public
key
𝑃 𝑈
𝐵
=h
𝐵
,𝑝