SLIDE 1 Revisiting Lattice Attacks on overstretched NTRU parameters
- P. Kirchner & P-A. Fouque
Université de Rennes 1, France
EUROCRYPT 2017 – 05/01/17
1
SLIDE 2 Plan
- 1. Background on NTRU and Previous Attacks
- 2. A New Subring Attack
- 3. Simplifjcation and Generalization
- 4. Prediction of our Attacks
2
SLIDE 3
NTRUEncrypt
Key Generation R = Z[X]/(Xn + 1), modulus q, width σ
▶ Sample f ← DR,σ (invertible mod q) ▶ Sample g ← DR,σ ▶ Publish h = [g/f]q
Encrypt m ∈ {0, 1}
▶ Sample s, e ← DR,χ, DR,χ ▶ Return c = 2(h · s + e) + m
Decrypt c ∈ Rq
▶ m′ = f · c = 2(g · s + f · e) + f · m ▶ Return m′ mod 2 = f · m mod 2 3
SLIDE 4
NTRU lattice Λq
h
Recovering the secret key from the public key A =
(
qIn Mh In
)
▶ The lattice Λq h defjned by A an NTRU instance for parameters
R, q, σ has dimension 2n and volume qn
▶ If h were uniformly random, the Gaussian heuristic predicts
the shortest vectors of Λq
h have norm ≈ √nq ▶ While ∥f∥ ≈ ∥g∥ ≈ √nσ ≪ √nq ▶ unusually short vectors: n vectors rotated of (f, g), (xif, xig).
SS11 : for σ ≈ √q, h is statistically indistinguisable from uniform, but NTRU chooses f, g ∈ {−1, 0, 1}n!
4
SLIDE 5
NTRU lattice Λq
h
Recovering the secret key from the public key A =
(
qIn Mh In
)
▶ The lattice Λq h defjned by A an NTRU instance for parameters
R, q, σ has dimension 2n and volume qn
▶ If h were uniformly random, the Gaussian heuristic predicts
the shortest vectors of Λq
h have norm ≈ √nq ▶ While ∥f∥ ≈ ∥g∥ ≈ √nσ ≪ √nq ▶ unusually short vectors: n vectors rotated of (f, g), (xif, xig).
SS11 : for σ ≈ √q, h is statistically indistinguisable from uniform, but NTRU chooses f, g ∈ {−1, 0, 1}n!
4
SLIDE 6
NTRU lattice Λq
h
Recovering the secret key from the public key A =
(
qIn Mh In
)
▶ The lattice Λq h defjned by A an NTRU instance for parameters
R, q, σ has dimension 2n and volume qn
▶ If h were uniformly random, the Gaussian heuristic predicts
the shortest vectors of Λq
h have norm ≈ √nq ▶ While ∥f∥ ≈ ∥g∥ ≈ √nσ ≪ √nq ▶ unusually short vectors: n vectors rotated of (f, g), (xif, xig).
SS11 : for σ ≈ √q, h is statistically indistinguisable from uniform, but NTRU chooses f, g ∈ {−1, 0, 1}n!
4
SLIDE 7
NTRU lattice Λq
h
Recovering the secret key from the public key A =
(
qIn Mh In
)
▶ The lattice Λq h defjned by A an NTRU instance for parameters
R, q, σ has dimension 2n and volume qn
▶ If h were uniformly random, the Gaussian heuristic predicts
the shortest vectors of Λq
h have norm ≈ √nq ▶ While ∥f∥ ≈ ∥g∥ ≈ √nσ ≪ √nq ▶ unusually short vectors: n vectors rotated of (f, g), (xif, xig).
SS11 : for σ ≈ √q, h is statistically indistinguisable from uniform, but NTRU chooses f, g ∈ {−1, 0, 1}n!
4
SLIDE 8
NTRU Assumptions and Applications
Defjnition (NTRU Assumption)
It is hard to fjnd a short vector in the R-module Λq
h = {(x, y) ∈ R2 s.t. hx − y = 0 mod q}
R = Z[X]/(P(X)) and the promise a short solution (f, g) exists. The NTRU assumption has been used for
▶ signature scheme: BLISS (Ducas, Durmus, Lepoint,
Lyubashevsky), based on IBE (Ducas, Prest, Lyubashevsky)
▶ fully homomorphic encryption: LTV (Lopez-Alt, Tromer and
Vaikuntanathan), YASHE (Bos, Lauter, Loftus, Naehrig)
▶ multilinear Maps from Ideal Lattices: GGH13
With very large modulus q compared to NTRUEncrypt!
5
SLIDE 9
NTRU Assumptions and Applications
Defjnition (NTRU Assumption)
It is hard to fjnd a short vector in the R-module Λq
h = {(x, y) ∈ R2 s.t. hx − y = 0 mod q}
R = Z[X]/(P(X)) and the promise a short solution (f, g) exists. The NTRU assumption has been used for
▶ signature scheme: BLISS (Ducas, Durmus, Lepoint,
Lyubashevsky), based on IBE (Ducas, Prest, Lyubashevsky)
▶ fully homomorphic encryption: LTV (Lopez-Alt, Tromer and
Vaikuntanathan), YASHE (Bos, Lauter, Loftus, Naehrig)
▶ multilinear Maps from Ideal Lattices: GGH13
With very large modulus q compared to NTRUEncrypt!
5
SLIDE 10
NTRU Assumptions and Applications
Defjnition (NTRU Assumption)
It is hard to fjnd a short vector in the R-module Λq
h = {(x, y) ∈ R2 s.t. hx − y = 0 mod q}
R = Z[X]/(P(X)) and the promise a short solution (f, g) exists. The NTRU assumption has been used for
▶ signature scheme: BLISS (Ducas, Durmus, Lepoint,
Lyubashevsky), based on IBE (Ducas, Prest, Lyubashevsky)
▶ fully homomorphic encryption: LTV (Lopez-Alt, Tromer and
Vaikuntanathan), YASHE (Bos, Lauter, Loftus, Naehrig)
▶ multilinear Maps from Ideal Lattices: GGH13
With very large modulus q compared to NTRUEncrypt!
5
SLIDE 11 Current Attacks on NTRU
▶ Recovering a short enough vector larger than (f, g) is suffjcient
to recover the secret key
▶ Finding a o(q) vector would break many applications such as
encryption
▶ Previous Lattice attacks:
- 1. Direct Approach: we need a strong lattice reduction and
NTRU is still secure
- 2. May increases the λ1(L)/λ2(L) by avoiding the rotated vectors
and reduces the dimension by projecting the lattice
- 3. Howgrave-Graham combines lattice-reduction and MITM: fjrst
reduces a submatrice in the middle of the lattice L
Asymptotically BKW variant: heuristic complexity of 2Θ(n/ log log q)
6
SLIDE 12 Current Attacks on NTRU
▶ Recovering a short enough vector larger than (f, g) is suffjcient
to recover the secret key
▶ Finding a o(q) vector would break many applications such as
encryption
▶ Previous Lattice attacks:
- 1. Direct Approach: we need a strong lattice reduction and
NTRU is still secure
- 2. May increases the λ1(L)/λ2(L) by avoiding the rotated vectors
and reduces the dimension by projecting the lattice
- 3. Howgrave-Graham combines lattice-reduction and MITM: fjrst
reduces a submatrice in the middle of the lattice L
Asymptotically BKW variant: heuristic complexity of 2Θ(n/ log log q)
6
SLIDE 13 Current Attacks on NTRU
▶ Recovering a short enough vector larger than (f, g) is suffjcient
to recover the secret key
▶ Finding a o(q) vector would break many applications such as
encryption
▶ Previous Lattice attacks:
- 1. Direct Approach: we need a strong lattice reduction and
NTRU is still secure
- 2. May increases the λ1(L)/λ2(L) by avoiding the rotated vectors
and reduces the dimension by projecting the lattice
- 3. Howgrave-Graham combines lattice-reduction and MITM: fjrst
reduces a submatrice in the middle of the lattice L
Asymptotically BKW variant: heuristic complexity of 2Θ(n/ log log q)
6
SLIDE 14 Subfjeld Attack
▶ Lattice reduction in a subfjeld to attack the NTRU
assumption for large moduli q and σ < q1/4
▶ Strategy: Reducing the dimension allows faster algorithms
- 1. Map a NTRU instance to the chosen subfjeld (dim. n/2)
- 2. Apply lattice reduction
- 3. Lift the solution to the full fjeld
▶ Albrecht, Bai, Ducas rediscovered this attack already sketched
by Gentry, Szydlo, Jonsson, Nguyen and Stern
▶ Cheon, Jeong and Lee discovered a variant using the Trace
instead of the Norm
▶ Work with any coeffjcient of the characteristic polynomial 7
SLIDE 15 Subfjeld Attack
▶ Lattice reduction in a subfjeld to attack the NTRU
assumption for large moduli q and σ < q1/4
▶ Strategy: Reducing the dimension allows faster algorithms
- 1. Map a NTRU instance to the chosen subfjeld (dim. n/2)
- 2. Apply lattice reduction
- 3. Lift the solution to the full fjeld
▶ Albrecht, Bai, Ducas rediscovered this attack already sketched
by Gentry, Szydlo, Jonsson, Nguyen and Stern
▶ Cheon, Jeong and Lee discovered a variant using the Trace
instead of the Norm
▶ Work with any coeffjcient of the characteristic polynomial 7
SLIDE 16 Subfjeld Attack
▶ Lattice reduction in a subfjeld to attack the NTRU
assumption for large moduli q and σ < q1/4
▶ Strategy: Reducing the dimension allows faster algorithms
- 1. Map a NTRU instance to the chosen subfjeld (dim. n/2)
- 2. Apply lattice reduction
- 3. Lift the solution to the full fjeld
▶ Albrecht, Bai, Ducas rediscovered this attack already sketched
by Gentry, Szydlo, Jonsson, Nguyen and Stern
▶ Cheon, Jeong and Lee discovered a variant using the Trace
instead of the Norm
▶ Work with any coeffjcient of the characteristic polynomial 7
SLIDE 17
Cyclotomic Number Field
▶ K = Q[ωn] ≃ Q[X]/(Φn(X)) where ωn = exp(2iπ/n) ▶ L = Q(ωn + ¯
ωn): maximal real subfjeld of K of dim. (n − 1)/2
▶ Conjugate: ¯
a = a0 + ∑ϕ(n)−1
i=1
aiXϕ(n)−i for a = ∑ϕ(n)−1
i=0
aiXi
▶ NK/L(a) = a¯
a ∈ L
▶ More generally, if L subfjeld of K of dim. m and r = n/m,
NK/L(a) = Πσ∈Hσ(a) for H fjxing L
▶ Ring of integers: OK = Z[ωn] = {a ∈ K : f a Q ∈ Z[X]} where
f a
Q is the monic irreducible minimal polynomial of a over Q ▶ Ideal gOK can be represented by a lattice: multiplication
matrix by g in OK
8
SLIDE 18
Cyclotomic Number Field
▶ K = Q[ωn] ≃ Q[X]/(Φn(X)) where ωn = exp(2iπ/n) ▶ L = Q(ωn + ¯
ωn): maximal real subfjeld of K of dim. (n − 1)/2
▶ Conjugate: ¯
a = a0 + ∑ϕ(n)−1
i=1
aiXϕ(n)−i for a = ∑ϕ(n)−1
i=0
aiXi
▶ NK/L(a) = a¯
a ∈ L
▶ More generally, if L subfjeld of K of dim. m and r = n/m,
NK/L(a) = Πσ∈Hσ(a) for H fjxing L
▶ Ring of integers: OK = Z[ωn] = {a ∈ K : f a Q ∈ Z[X]} where
f a
Q is the monic irreducible minimal polynomial of a over Q ▶ Ideal gOK can be represented by a lattice: multiplication
matrix by g in OK
8
SLIDE 19
Cyclotomic Number Field
▶ K = Q[ωn] ≃ Q[X]/(Φn(X)) where ωn = exp(2iπ/n) ▶ L = Q(ωn + ¯
ωn): maximal real subfjeld of K of dim. (n − 1)/2
▶ Conjugate: ¯
a = a0 + ∑ϕ(n)−1
i=1
aiXϕ(n)−i for a = ∑ϕ(n)−1
i=0
aiXi
▶ NK/L(a) = a¯
a ∈ L
▶ More generally, if L subfjeld of K of dim. m and r = n/m,
NK/L(a) = Πσ∈Hσ(a) for H fjxing L
▶ Ring of integers: OK = Z[ωn] = {a ∈ K : f a Q ∈ Z[X]} where
f a
Q is the monic irreducible minimal polynomial of a over Q ▶ Ideal gOK can be represented by a lattice: multiplication
matrix by g in OK
8
SLIDE 20
Analysis
Consider the lattice generated by this matrix Anorm =
(
qIn/r MOL
NK/L(h)
In/r
)
where NK/L(h) ∈ OL.
▶ (NK/L(f), NK/L(g)) is contained in this lattice. ▶ expect short vector ≈ qn/(2n)√
2n/(2πre) =
√
qn/(πre)
▶ For L real subfjeld of K, if ∥f∥ > √n and as f¯
f ⩾ ∥f∥2 = n, but since n ⩾ q/2, the attack does not work on NTRU parameters But with very large modulus q, NK/L(f) = f¯ f is smaller than the expected short vector !
9
SLIDE 21
Analysis
Consider the lattice generated by this matrix Anorm =
(
qIn/r MOL
NK/L(h)
In/r
)
where NK/L(h) ∈ OL.
▶ (NK/L(f), NK/L(g)) is contained in this lattice. ▶ expect short vector ≈ qn/(2n)√
2n/(2πre) =
√
qn/(πre)
▶ For L real subfjeld of K, if ∥f∥ > √n and as f¯
f ⩾ ∥f∥2 = n, but since n ⩾ q/2, the attack does not work on NTRU parameters But with very large modulus q, NK/L(f) = f¯ f is smaller than the expected short vector !
9
SLIDE 22
Analysis
Consider the lattice generated by this matrix Anorm =
(
qIn/r MOL
NK/L(h)
In/r
)
where NK/L(h) ∈ OL.
▶ (NK/L(f), NK/L(g)) is contained in this lattice. ▶ expect short vector ≈ qn/(2n)√
2n/(2πre) =
√
qn/(πre)
▶ For L real subfjeld of K, if ∥f∥ > √n and as f¯
f ⩾ ∥f∥2 = n, but since n ⩾ q/2, the attack does not work on NTRU parameters But with very large modulus q, NK/L(f) = f¯ f is smaller than the expected short vector !
9
SLIDE 23
Subfjeld attack
Consider the lattice generated by this matrix Anorm =
(
qIn/r MOL
NK/L(h)
In/r
)
where NK/L(h) ∈ OL.
▶ (f ′ = NK/L(f), g ′ = NK/L(g)) ∈ Λ(Anorm) ▶ ∥f ′∥ ≈ (σn)r where r = [K : L] ▶ solution returned by BKZ: ∥(x ′, y ′)∥ ⩽ βΘ(n/βr) · (nσ)Θ(r) ▶ if ∥(x ′, y ′)∥ < q/∥(f ′, g ′)∥, (x ′, y ′) = v(f ′, g ′) for v ∈ OL
Effjcient: small dimension (2n/r) and lifting the solution to K
10
SLIDE 24
Subfjeld attack
Consider the lattice generated by this matrix Anorm =
(
qIn/r MOL
NK/L(h)
In/r
)
where NK/L(h) ∈ OL.
▶ (f ′ = NK/L(f), g ′ = NK/L(g)) ∈ Λ(Anorm) ▶ ∥f ′∥ ≈ (σn)r where r = [K : L] ▶ solution returned by BKZ: ∥(x ′, y ′)∥ ⩽ βΘ(n/βr) · (nσ)Θ(r) ▶ if ∥(x ′, y ′)∥ < q/∥(f ′, g ′)∥, (x ′, y ′) = v(f ′, g ′) for v ∈ OL
Effjcient: small dimension (2n/r) and lifting the solution to K
10
SLIDE 25 Subfjeld attack
▶ Condition to work: √q = βΘ(2n/(rβ)) · nΘ(r) when σ = poly(n)
- 1. Faster than the direct attack with dim. 2n when q
super-polynomial:
▶ Subfjeld: β/ log β = Θ(n log n/ log2 q) for r = Θ(log q/ log n) ▶ Direct: β/ log β = Θ(n/ log q)
- 2. Quasi-polynomial time when q is exponential in n
Reparations
▶ R = Z[X]/(Xp − X − 1) as suggested by Bernstein et al.:
NTRUprime
▶ K = Q(ζp + ¯
ζp) with safe prime p: Galois with no subfjeld
11
SLIDE 26 Subfjeld attack
▶ Condition to work: √q = βΘ(2n/(rβ)) · nΘ(r) when σ = poly(n)
- 1. Faster than the direct attack with dim. 2n when q
super-polynomial:
▶ Subfjeld: β/ log β = Θ(n log n/ log2 q) for r = Θ(log q/ log n) ▶ Direct: β/ log β = Θ(n/ log q)
- 2. Quasi-polynomial time when q is exponential in n
Reparations
▶ R = Z[X]/(Xp − X − 1) as suggested by Bernstein et al.:
NTRUprime
▶ K = Q(ζp + ¯
ζp) with safe prime p: Galois with no subfjeld
11
SLIDE 27
New Subring Attack
A =
(
qIn MOL
h
In/r
)
▶ Original lattice but we put MOL h
in a subring of OK
▶ For any g ∈ O, NK/L(g) ∈ gO ∩ OL ▶ We show that (fNK/L(g)/g, NK/L(g)) ∈ Λ(A) and is short
Effjciency ? Subfjeld attack dim. is 2n/r instead n + n/r ?
12
SLIDE 28
New Subring Attack
Runtime of lattice reduction depends on the dimension and approx. factor (slope of the line)
▶ Increase the volume of the lattice ▶ Use a projected lattice to reduce the dimension ! 13
SLIDE 29
New Subring Attack
Runtime of lattice reduction depends on the dimension and approx. factor (slope of the line)
▶ Increase the volume of the lattice ▶ Use a projected lattice to reduce the dimension ! 13
SLIDE 30
New Subring Attack
A =
(
qIn MOL
h
In/r
)
▶ This approach is more fmexible: it allows to reduce the
dimension and the number of coordinates !
▶ Projected Lattice: extract the last d rows and columns ▶ Heuristic: If the algorithm fjnds a vector shorter than the
Minkowski bound, it is a multiple of the key
▶ if log σ = Θ(log n), poly-time algo when q = 2Ω(√ n log log n) ▶ if σ = Θ(√n), faster algo. as soon as q ⩾ nΘ(√ log log n) ▶ β/ log β = Θ(n log σ/ log2 q) and d ⩾ 2n/r 14
SLIDE 31
New Subring Attack
A =
(
qIn MOL
h
In/r
)
▶ This approach is more fmexible: it allows to reduce the
dimension and the number of coordinates !
▶ Projected Lattice: extract the last d rows and columns ▶ Heuristic: If the algorithm fjnds a vector shorter than the
Minkowski bound, it is a multiple of the key
▶ if log σ = Θ(log n), poly-time algo when q = 2Ω(√ n log log n) ▶ if σ = Θ(√n), faster algo. as soon as q ⩾ nΘ(√ log log n) ▶ β/ log β = Θ(n log σ/ log2 q) and d ⩾ 2n/r 14
SLIDE 32
Simplifjcation and Generalization
Are these attacks better than other practical attacks NTRU: the lattice reduction step of the hybrid attack ? A =
(
qIn MOK
h
In
)
There are n short vectors rotated of (f, g), (xif, xig).
▶ Finding a vector in a sublattice of low volume for lattice
reduction algo. depends on the rank of the sublattice
▶ Previous analysis restrict to the special case of rank one ▶ Pataki & Tural: the volume of the sublattice generated by r
vectors is larger than the product of the r smallest GS norms
15
SLIDE 33
Simplifjcation and Generalization
Are these attacks better than other practical attacks NTRU: the lattice reduction step of the hybrid attack ? A =
(
qIn MOK
h
In
)
There are n short vectors rotated of (f, g), (xif, xig).
▶ Finding a vector in a sublattice of low volume for lattice
reduction algo. depends on the rank of the sublattice
▶ Previous analysis restrict to the special case of rank one ▶ Pataki & Tural: the volume of the sublattice generated by r
vectors is larger than the product of the r smallest GS norms
15
SLIDE 34
Simplifjcation and Generalization
Are these attacks better than other practical attacks NTRU: the lattice reduction step of the hybrid attack ? A =
(
qIn MOK
h
In
)
There are n short vectors rotated of (f, g), (xif, xig).
▶ Finding a vector in a sublattice of low volume for lattice
reduction algo. depends on the rank of the sublattice
▶ Previous analysis restrict to the special case of rank one ▶ Pataki & Tural: the volume of the sublattice generated by r
vectors is larger than the product of the r smallest GS norms
15
SLIDE 35 Simplifjcation and Generalization
Are these attacks better than other practical attacks NTRU: the lattice reduction step of the hybrid attack ? A =
(
qIn MOK
h
In
)
- 1. We reduce the middle of the matrix A
- 2. Same effjciency w/o subfjeld with an orthogonal basis of O
Recovery: half of fO and gO and heuristically the middle matrix is a basis of (f, g)O
16
SLIDE 36 Experiments on NTRU
log n log q log r Success Method Coordinates Origin 11 165 4 Yes ABD16 128
115 4 Yes Ours 510
114 4 No Ours 630
95 3 Yes ABD16 256
81 3 Yes Ours 600
80 3 No Ours 600
79 3 No Ours 860 YASHE 11 70 2 Yes Ours 600
69 2 No Ours 600
190 4 Yes ABD16 256
157 4 Yes Ours 430 YASHE 12 144 4 Yes Ours 850
143 4 No Ours 850
383 4 Yes Ours 512 Dowlin 13 312 5 Yes Ours 470 YASHE
17
SLIDE 37
Experiments and Prediction
log n log q log r Success Method Coordinates Origin 14 622 5 Yes Ours 470 YASHE 15 1271 5 Yes Ours 512 Doroz 15 1243 6 Yes Ours 660 YASHE 16 2485 7 Yes Ours 820 YASHE log n Prediction log r 11 116 4 11 82 3 11 71 2 12 146 4
18
SLIDE 38
Experiments on NTRUprime with Large Moduli
log n log q ℓ Success 11 72 1116 Yes 11 70 1200 Yes 11 69 1200 No 12 118 1024 Yes 12 117 1024 No 12 105 1700 Yes 12 104 1700 No 13 230 1024 Yes 14 450 1024 Yes 15 930 1024 Yes log n ℓ Prediction 11 1033 71 12 1472 106 13 2275 156 14 3357 230 15 5127 337 16 7124 477
19
SLIDE 39
Conclusion
Provable Security and Attack
▶ The property that we use is present until σ ≈ √nq ▶ Stehlé and Steinfeld prove security for σ ≈
√
n3q
▶ Attack: more effjcient on NTRU than Ring-LWE σ ≲ √q/n ▶ Standard cryptography (signature, key exchange and IBE) use
modulus q ⩽ n2 and attack doesn’t apply
20
SLIDE 40
Conclusion
▶ Subfjeld attack and our subring attack are slower than the
direct attack with projection
▶ We broke many instantiations of FHE schemes in practice ▶ First time: n rotated small vectors are useful to analyze the
security of NTRU !
21