Elliptic Curve Cryptography: Dan Boneh Stanford University
Elliptic Curve Cryptography: Dan Boneh Stanford University
Dan Boneh
Stanford University
Dan Boneh
Diophantus (200-300 AD, Alexandria)
Interested in rational points on curves
• rational number: 1/2 , 13/8 , but not sqrt(2)
• rational point: (x, y) where x and y are rational
Example: what are the rational points on the curve
2 2 (0,1)
x +y =1 4 3
5, 5
⇣ ⌘ (-1,0)
s2 1
s rational ⇒ 2s
s2 +1 , s2 +1
on curve
<latexit sha1_base64="hg2e41E33METJHEdsRGoI8KxNXU=">AAACIXicbVDLSgMxFM3UV62vat25CRahopaZumiXRTcuK9gHdGrJpJk2NPMguSOUoT8hrt34K25cKNKd+AN+hulD0NYDIYdzziW5xwkFV2CaH0ZiaXlldS25ntrY3NreSe/u1VQQScqqNBCBbDhEMcF9VgUOgjVCyYjnCFZ3+pdjv37HpOKBfwODkLU80vW5yykBLbXTJVswF3I2tl1JaKxuC2fWcHydWMNTG8/kgvrRdFDybg+O2+msmTcnwIvEmpFsufhwP8h87Vfa6ZHdCWjkMR+oIEo1LTOEVkwkcCrYMGVHioWE9kmXNTX1icdUK55sOMRHWulgN5D6+IAn6u+JmHhKDTxHJz0CPTXvjcX/vGYEbqkVcz+MgPl0+pAbCQwBHteFO1wyCmKgCaGS679i2iO6E9ClpnQJ1vzKi6RWyFvn+cK1lS1foCmS6AAdohyyUBGV0RWqoCqi6BE9o1f0ZjwZL8a7MZpGE8ZsJoP+wPj8BvlopSc=</latexit>
Thm: all rational points are obtained this way [except for (1,0)]
Dan Boneh
Diophantus (200-300 AD, Alexandria)
Studied many similar problems: find rational points on
x2 + 2y 2 = 11 , 2x2 y2 = 2 , …
Wrote 13 books of arithmetica … six survived (four in Vatican library)
“Why ellipses are not elliptic curves,” A. Rice, E. Brown, 2012 Dan Boneh
An observation
E: y 2 = x3 + ax + b
R
Fact: if P and Q are rational point on E -S
then so is R Q
P
Gives an algorithm to build rational points:
S
P = (0,-3) , Q = (1,3) ⇒ R = (35 , 207 )
✓ ◆
1259 128211
P , -R ⇒ S= 1225
,
42875 -R
⋮ ⋮ ⋮
“Diophantus and Diophantine Equations,” Bashmakova, 1997 Dan Boneh
Point addition
Define: P ⊞ Q = -R R
⇒ simply write: P ⊞ Q⊞ T
-R = P⊞Q
Dan Boneh
What if P == Q ?? (point doubling)
E: y 2 = x3 + ax + b
R
How to define P ⊞ P ?? P 3P
e nt
Define P ⊞ P = -R ng
ta
Write: 2P = P ⊞ P
new rational points -R = 2P
3P = P ⊞ P ⊞ P
from one rational point P
4P = P ⊞ P ⊞ P ⊞ P (… not always new)
Dan Boneh
Last corner case
O
What is P ⊞ (-P) ??
Define: P ⊞ (-P) = O -P
P⊞ O = P
Dan Boneh
Summary: adding points
E: y 2 = x3 + ax + b
points on E: P = (x1 , y1 ), Q = (x2 , y2 ), R=P Q (not O)
if P = -Q: ⇒ R=O
3x21 +a
else if P = Q: ⇒ k= 2y1
xR = k 2 x1 x2
y2 y 1 yR = y1 k(xR x1 )
else (P ≠ ±Q): ⇒ k= x2 x1
R = (xR , yR )
Dan Boneh
Back to Diophantus
Rational points on E: y 2 = x3 x+9
17 55 664 17811
P = (1, 3), 2P = 9 , 27 , 3P = 132 , 133 , 4P =( 257299
1652
, 130479157
1653
), ...
1 647
Q = (0, 3), 2Q = 36 , 216 , 3Q = (46584, 10054377)
“Elliptic Curves from Mordell to Diophantus and Back,” E. Brown, B. Myers, 2002 Dan Boneh
Curves modulo primes
Let p be a prime. Let Fp = {0,1,…,p-1}
y 2 ⌘ x3 + ax + b (mod p)
b
B¬g (mod p)
B a
® b a
(g ) ® gab ¬ a b
(g ) ¬ Ab
Dan Boneh
Security of Diffie-Hellman (eavesdropping only)
public: p and g
a
random a A ¬ g (mod p) random b
b
B¬g (mod p)
CDH problem (mod p): given random (g, ga, gb) compute gab (mod p)
Dan Boneh
How hard is CDH mod p ??
p
Best known algorithm (GNFS): for n-digit prime, time ≈ 2 Õ( 3 n)
Dan Boneh
Can we use elliptic curves instead ?? (1985)
Fix prime p,
curve y 2 = x3 + ax + b (mod p)
and point P on curve
B ¬ v⋅P (mod p)
point P=(Px,Py)
Of the Web sites that support ECDHE … 96.1% use P-256 [HABJ’14]
Dan Boneh
Where does P-256 come from?
FIPS 186-3 appendix D.1.2.3:
SHA-1
???
P-256 parameters
“Faster Addition and Doubling on Elliptic curves,” D. Bernstein and T. Lange, 2007 Dan Boneh
What does NSA say?
https://www.nsa.gov/business/programs/elliptic_curve.shtml Jan. 2009
Dan Boneh
What does NSA say?
Then in August 2015:
For those partners and vendors that have not yet made
the transition to Suite B elliptic curve algorithms,
we recommend not making a significant expenditure to
do so at this point but instead to prepare for the upcoming
quantum resistant algorithm transition.
Pairing-based Cryptography
P
e(P,Q)
Q
Dan Boneh
A new tool: pairings
A. Weil (1949): a pairing ê(P, Q) on elliptic curves
s.t. for all points P, Q and integers u, v :
u·v
ê(uP, vQ) = ê(P, Q)
curve Fpα
u⋅P
V. Miller (1986): pairing is efficiently e(P,Q)
uv
computable!
v⋅Q
( u, v unknown)
Dan Boneh
Applications of pairings
Many many applications for pairings:
• New signatures: BLS sigs., group signatures, ring signatures
• Encryption: Identity-based encryption, attribute-based
encryption, searchable encryption, broadcast encryption
• Short non-interactive proofs, adaptive oblivious transfer
Dan Boneh
Another look at Diffie-Hellman:
non-interactive key exchange
Facebook
ga gb gc gd
ga gb gc gd n=4
ga gb gc gd
ga gb gc gd
Dan Boneh