Geometry in Cryptography
Luca Giuzzi
Summer School
Giuseppe Tallini
Cryptosystems • M set of messages • K set of keys • C set of cyphertexts • e : M × K 7→ C encryption • d : C × K 7→ M decryption ∀k ∈ K : ∃k0 ∈ K such that ∀m ∈ M :d(e(m, k), k0) = m.
Discrete Logarithm Problem • G = hgi group • m ∈ G Determine α ∈ N such that m = gα
ElGamal cryptosystem/1 Common elements: • G: cyclic group; • g ∈ G, generator of G. Secret key: • α ∈ N. Public key: • gα ∈ G.
ElGamal cryptosystem/2
Encoding:
• M ∈ G message to be transmitted;
• the sender computes a random k ∈ N;
• the sender transmits the pair
(e, f ) = (gk, M (gα)k) = (gk, M gkα). Decoding:
• the receiver computes
d = eα = gkα;
ElGamal cryptosystem/3
Requirements on G:
• There is an efficient implementation of the group operation:
(x, α) 7→ xα; (M, x) 7→ Mx;
• There is an efficient implementation of in-version:
d 7→ d−1;
• The Discrete Logarithm Problem is hard to solve in G.
Massey–Omura cryptosystem/1
Common elements:
• G: Abelian group.
Secret key:
• eA ∈ N with gcd(e, |G|) = 1;
• dA ∈ N such that eAdA ≡ 1 (mod |G|).
Massey–Omura cryptosystem/2
Operation:
• P ∈ G: message to be sent from to .
1. A computes and sends
P0 = PeA;
2. B computes and sends back
P00 = P0eB = PeAeB;
3. A computes and sends back
P000 = P00dA = PeAdAeB = PeB
4. B recovers
Massey–Omura cryptosystem/3
Requirements on G:
• The order of G is known;
• There is an efficient implementation of the exponentiation in G:
(x, α) 7→ xα;
• The Discrete Logarithm Problem is hard to solve in G.
Exponentiation in groups Given: • G group • g ∈ G • α ∈ N Determine: gα. Trivial approach: gα = g · · · g | {z } α times .
Square and multiply
1. If α = 0, then return 1;
2. If α = 1, then return g;
3. If α = 2k, then compute h = g2 and return hk;
4. If α = 2k + 1, then compute h = g2 and return
Elliptic curves/1
• Elliptic curve over K:
(birationally equivalnent to) non–singular cubic
with at least one point
y2 + ay = x3 + bx2 + cxy + dx + e.
• If charK 6= 2, 3,
y2 = x3 + ax + b or (equivalent)
Elliptic curves/2
Elliptic curve over GF(2n):
• non–supersingular
y2 + xy = x2 + ax2 + b;
• supersingular (2 = p | |C|)
Elliptic curves/3:group law
PSfrag replacements A B −(A + B)
A + B
Elliptic curves/4:group law
• C elliptic curve;
• O ∈ C fixed point (inflexion);
• Θ(A, B) third intersection of AB with C.
Elliptic curves/5:group law, associativity PSfrag replacements A B C O R= Θ(C, B) P= Θ(A, B) Q= Θ(O, (A + B) + C) A + B B + C (A + B) + C Claim: (B + C) ∈ AQ.
Elliptic curves/6:group law, inversion • O inflexion • P = (x, y) ∈ C • p 6= 2, 3 P 7→ −P = (−x, −y); • p = 2, non–supersingular P 7→ −P = (x, y + x); • p = 2, supersingular P 7→ −P = (x, y + c)
Elliptic curves/7:group law, duplication, p 6= 2, 3 • y2 = x3 + ax + b; • P = (x1, y1); • 2P = (x3, y3); • λ = 3x 2 1 + a 2y1 • x3 = λ2 − x1 − x2; • y3 = λ(x1 − x3) − y1.
Elliptic curves/8:group law, sum, p 6= 2, 3 • y2 = x3 + ax + b; • P = (x1, y1); • Q = (x2, y2); • P + Q = (x3, y3); • λ = y2 − y1 x2 − x1 • x3 = λ2 − x1 − x2;
Elliptic curves/9:group law, duplication, non–supersing. • y2 + xy = x3 + ax2 + b, b 6= 0; • P = (x1, y1); • 2P = (x3, y3); • µ = x1 + y1 x1 • x3 = µ2 + µ + a • y3 = x21 + (µ + 1)x3
Elliptic curves/10:group law, sum, non–supersing. • y2 + xy = x2 + ax2 + b, b 6= 0; • P = (x1, y1); • Q = (x2, y2); • P + Q = (x3, y3); • κ = y1 + y2 x1 + x2; • x3 = κ2 + κ + x1 + x2 + a;
Elliptic curves/11:group law, duplication, super-sing. • y2 + cx = x3 + ax + b, c 6= 0; • P = (x1, y1); • 2P = (x3, y3); • η = x 2 1 + a c • x3 = η2 • y3 = η(x1 + x3) + y1 + c
Elliptic curves/12:group law, sum, supersing. • y2 + cx = x3 + ax + b, c 6= 0; • P = (x1, y1); • Q = (x2, y2); • P + Q = (x3, y3); • κ = y1 + y2 x1 + x2; • x3 = κ2 + κ + x1 + x2;
Elliptic curves/13:group order • |C| = q + 1 − t with |t| ≤ 2√q. • K = GF(p), p 6= 2, 3: p + X x∈K x3 + ax + b p ! , where p· is the Legendre symbol;
• C non–supersingular, K = GF(2m): 2m+1+(−1)Tr(a) X 06=x∈K (−1)Tr(x+bx−2); • C supersingular, K = GF(2m): 2m+1+(−1)Tr(c−2b) X x∈K (−1)Tr[c−2(x3+ax)].
Elliptic curves/14:group structure Either: • C = Zn or • C = Zn 1 ⊕ Zn2 with n2 | n1 and n2 | (q − 1).