Week09 - Asymmetric Cryptography - P4
Week09 - Asymmetric Cryptography - P4
1
2
𝑃𝑈={𝑛, 𝑒} 4
Openssl_key_geneeration.txt
05-2023 NT219–Cryptography Week 9: 4
Implementation The RS A Algorithm
𝑃𝑈={𝑛, 𝑒} • Encrypt
𝑒
𝐶 =𝑚 𝑚𝑜𝑑 𝑛
𝑔𝑏 mod p =
560048104293218128667441021342483133802626271394299410128798
𝑎= 𝑏=
685408003627063 362059131912941
761059275919665 987637880257325
781694368639459 269696682836735
527871881531452 𝑔𝑎𝑏 mod p = 524942246807440
437452857085801785219961443000 𝑏
845969831329749878767465041215 (𝑔¿¿𝑎) 𝑚𝑜𝑑𝑝¿
05-2023 NT219–Cryptography Week 9: 7
Computational hardness assumptions
𝐸/ℝ : 𝑦 2 = 𝑥 3 + 𝑥 + 1 𝐸/ℝ : 𝑦 2 = 𝑥 3 − 𝑥
05-2023 NT219–Cryptography Week 9: 12
Elliptic curves
Weierstrass form
𝐸 / ℤ7 : 𝑦 2= 𝑥 3+ 𝑥+ 1(𝑚𝑜𝑑 7)
𝐸/ℝ : 𝑦 2 = 𝑥 3 + 𝑥 + 1
x y
1 3 x
2 4 2,5
3 3 x
4 6 x
5 5 x
6 6 x
𝐸/ℝ :
𝐸/𝐾:
where field
𝐸/ℝ :
https://safecurves.cr.yp.to/
05-2023 NT219–Cryptography Week 9: 16
Elliptic curves
Twisted Edwards form
𝐸/𝐾: 𝐸 specified
by: 𝐾, a, d
𝐸/ℝ :
https://safecurves.cr.yp.to/
05-2023 NT219–Cryptography Week 9: 17
Elliptic group
Addition of two points:
y If P1 and P2 are on E, we
can define sum
P2
P1 as shown in picture
x
P3
=P+P
P+P= O (infinity)
P+ O = P
O+ P=P
P+(-P)= O (infinity)
(P + Q) + R = P + (Q + R) (associativity)
Hardness assumption.
d Q = dG = G + G + … + G.
• Discrete Log Problem (DLP):
𝐺 , 𝑄 (¿ 𝑑𝐺) ↦ 𝑑
where
times
Diffie– No No Yes
Hellman
DSS No Yes No
times
( 𝐺 , 𝑃 𝐾 𝐵 =𝑏𝐺 , 𝑆𝐾 = 𝑏)
• Input:
• Select a random integer
• Decrypt
, compute
• Encrypt (𝑅 , 𝐶 )
𝑅=𝑘𝐺 , 𝐶=𝑀 +𝑘 . 𝑃 𝐾 𝐵
𝑄 𝐴 (¿ 𝑎 . 𝐺)
)
Alice, A Bob, B
• Alice computes
• Bob computes
• These are the same since
(𝑎 , 𝑄 𝐴 =𝑎𝐺) 𝑸𝑩 (𝑏 , 𝑄 𝐵 =𝑏𝐺)
Smart cards
Any application where security is needed but lacks the power, storage