Top Banner
A subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes . Martin R. Albrecht, Shi Bai and Léo Ducas WHEAT, Paris, July 2016
65

A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Feb 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

A subfield lattice attack on overstretchedNTRU assumptionsCryptanalysis of some FHE and Graded EncodingSchemes.

Martin R. Albrecht, Shi Bai and Léo DucasWHEAT, Paris, July 2016

Page 2: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 3: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 4: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRUEncrypt

Key Generation R = Z[X]/(Xn + 1), modulus q, width parameter σ• Sample f← DR,σ (invertible mod q)• Sample g← DR,σ

• Publish h = [g/f]qEncrypt m ∈ {0, 1}

• Sample s, e← DR,χ,DR,χ

• Return 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

.

Page 5: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

The NTRU lattice Λqh

sage: K.<zeta> = CyclotomicField(8)sage: OK = K.ring_of_integers()sage: h = -36*zeta^3 + 44*zeta^2 + 14*zeta + 28sage: h

−36ζ38 + 44ζ2

8 + 14ζ8 + 28sage: H = h.matrix(); q = 97sage: block_matrix([[1, H],[0, q]])

1 28 14 44 −361 36 28 14 44

1 −44 36 28 141 −14 −44 36 28

9797

9797

.

Page 6: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

The NTRU lattice Λqh

• The lattice Λqh defined by an NTRU instance for parameters R, q, σ

has dimension 2n and volume qn.• If h were uniformly random, the Gaussian heuristic predicts that the

shortest vectors of Λqh have norm ≈ √nq.

• Whenever∥f∥ ≈ ∥g∥ ≈

√nσ ≪ √n q,

then Λqh has

unusually short vectors.

.

Page 7: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRU

Definition (NTRU Assumption)It is hard to find a short vector in the R-module

Λqh = {(x, y) ∈ R2 s.t. hx− y = 0 mod q}

with R = Z[X]/(P(X)) and the promise that a short solution (f, g) —the private key — exists.12

1Jeffrey Hoffstein, Jill Pipher, and Joseph H. Silverman. NTRU: A New High Speed Public KeyCryptosystem. Draft Distributed at Crypto’96, available athttp://web.securityinnovation.com/hubfs/files/ntru-orig.pdf. 1996.2Jeffrey Hoffstein, Jill Pipher, and Joseph H. Silverman. NTRU: A Ring-Based Public Key

Cryptosystem. In: ANTS. 1998, pp. 267–288.

.

Page 8: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRU Applications

The NTRU assumption has been utilised for

• signatures schemes,3

• fully homomorphic encryption,4

• candidate constructions for multi-linear maps.5

3Léo Ducas, Alain Durmus, Tancrède Lepoint, and Vadim Lyubashevsky. Lattice Signatures andBimodal Gaussians. In: CRYPTO 2013, Part I. ed. by Ran Canetti and Juan A. Garay. Vol. 8042.LNCS. Springer, Heidelberg, Aug. 2013, pp. 40–56. doi: 10.1007/978-3-642-40041-4_3.4Adriana López-Alt, Eran Tromer, and Vinod Vaikuntanathan. On-the-fly multiparty

computation on the cloud via multikey fully homomorphic encryption. In: 44th ACM STOC.ed. by Howard J. Karloff and Toniann Pitassi. ACM Press, May 2012, pp. 1219–1234;Joppe W. Bos, Kristin Lauter, Jake Loftus, and Michael Naehrig. Improved Security for aRing-Based Fully Homomorphic Encryption Scheme. In: 14th IMA International Conference onCryptography and Coding. Ed. by Martijn Stam. Vol. 8308. LNCS. Springer, Heidelberg, Dec.2013, pp. 45–64. doi: 10.1007/978-3-642-45239-0_4.5Sanjam Garg, Craig Gentry, and Shai Halevi. Candidate Multilinear Maps from Ideal Lattices.

In: EUROCRYPT 2013. Ed. by Thomas Johansson and Phong Q. Nguyen. Vol. 7881. LNCS.Springer, Heidelberg, May 2013, pp. 1–17. doi: 10.1007/978-3-642-38348-9_1.

.

Page 9: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Lattice Attacks

• Recovering a short enough vector of some target norm τ , potentiallylonger than (f, g), is sufficient for an attack.6

• In particular, finding a vector o(q) would break many applicationssuch as encryption.

• This requires strong lattice reduction and NTRU remainsasymptotically secure.78

6Don Coppersmith and Adi Shamir. Lattice Attacks on NTRU. . In: EUROCRYPT’97. Ed. byWalter Fumy. Vol. 1233. LNCS. Springer, Heidelberg, May 1997, pp. 52–61.7Jeffrey Hoffstein, Jill Pipher, and Joseph H. Silverman. NTRU: A Ring-Based Public Key

Cryptosystem. In: ANTS. 1998, pp. 267–288.8Jeff Hoffstein et al. Choosing Parameters for NTRUEncrypt. Cryptology ePrint Archive,

Report 2015/708. http://eprint.iacr.org/2015/708. 2015.

.

Page 10: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Best Attacks

Practical combined lattice-reduction and meet-in-the-middle attack9

of Howgrave-Graham.10

Asymptotic BKW variant, with a heuristic complexity 2Θ(n/ log log q).11

9Jeffrey Hoffstein, Joseph H. Silverman, and William Whyte. Meet-in-the-middle Attack on anNTRU private key. Technical report, NTRU Cryptosystems, July 2006. Report #04, available athttp://www.ntru.com. 2006.10Nick Howgrave-Graham. A Hybrid Lattice-Reduction and Meet-in-the-Middle Attack AgainstNTRU. . In: CRYPTO 2007. Ed. by Alfred Menezes. Vol. 4622. LNCS. Springer, Heidelberg, Aug.2007, pp. 150–169.11Paul Kirchner and Pierre-Alain Fouque. An Improved BKW Algorithm for LWE withApplications to Cryptography and Lattices. In: CRYPTO 2015, Part I. ed. by Rosario Gennaroand Matthew J. B. Robshaw. Vol. 9215. LNCS. Springer, Heidelberg, Aug. 2015, pp. 43–62. doi:10.1007/978-3-662-47989-6_3.

.

Page 11: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

TL;DR

• We use lattice reduction in a subfield to attack the NTRUassumption for large moduli q.

• This attack is asymptotically faster than the previously knownattacks as soon as q is super-polynomial.

• Strategy1. Map the NTRU instance to the chosen subfield.2. Apply lattice reduction.3. Lift the solution to the full field.

.

Page 12: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Related work

• approach already sketched by Gentry, Szydlo, Jonsson, Nguyen andStern12. Dismissed at that time because irrelevant against NTRUitself.

• Concurrently and independently, Cheon, Jeong and Lee13 alsoinvestigated subfield attacks on GGH-like graded encoding schemes.

• The general approach is similar to ours, but [CJL16]• uses the Trace map instead of the Norm,• only considers Graded Encoding Schemes,• restricts attention to power of two Cyclotomic rings and• has more powerful results against Graded Encoding Schemes.

12Craig Gentry and Michael Szydlo. Cryptanalysis of the Revised NTRU Signature Scheme. In:EUROCRYPT 2002. Ed. by Lars R. Knudsen. Vol. 2332. LNCS. Springer, Heidelberg, 2002,pp. 299–320.13Jung Hee Cheon, Jinhyuck Jeong, and Changmin Lee. An Algorithm for NTRU Problems andCryptanalysis of the GGH Multilinear Map without an encoding of zero. Cryptology ePrintArchive, Report 2016/139. http://eprint.iacr.org/. 2016.

.

Page 13: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 14: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Rings

• Our work is presented for arbitrary number fields, their ring ofintegers and their subfields.

• In this talk, I’ll focus on Cyclotomic number rings of degree n = 2k

for ease of exposure.

.

Page 15: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Cyclotomic Number Fields and Subfields

• Let R ≃ Z[X]/(Xn + 1) be the ring of integers of the Cylotomicnumber field K = Q(ζm) for some m = 2k and n = m/2.sage: K.<zeta> = CyclotomicField(8)sage: OK = K.ring_of_integers()sage: K.polynomial()

x4 + 1

.

Page 16: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Cyclotomic Number Fields and Subfields

• Let L = Q(ζm′) with m′|m be a subfield of K.• The ring of integers of L is R′ ≃ Z[X]/(Xn′

+ 1) with n′ = m′/2.• We write the canonical inclusion R′ ⊂ R explicitly as L : R′ →R.

sage: KK, L = K.subfield(zeta^2)sage: zeta_ = KK.gen()sage: L(zeta_)

ζ28

.

Page 17: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Cyclotomic Number Fields and Subfields

• K is a Galois extension of Q, and its Galois group G is isomorphic toZ∗

m: i ∈ Z∗m ↔ (X 7→ Xi) ∈ G.

sage: G = K.galois_group(); G

⟨(1, 2)(3, 4), (1, 3)(2, 4)⟩

.

Page 18: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Cyclotomic Number Fields and Subfields

• There is a one-to-one correspondence between the subgroups G′ ofG, and the subfields L of K.

• L is the subfield such that an automorphism of a ∈ G is the identityon L if an only if a ∈ G′.sage: G_ = [a for a in G if a(zeta_) == zeta_]sage: G_ = G.subgroup(G_); G_

⟨, (1, 2)(3, 4)⟩

.

Page 19: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Cyclotomic Number Fields and Subfields

• The norm NK/L : K→ L is the multiplicative map defined by

NK/L : f 7→∏ψ∈G′

ψ(f).

sage: f = OK.random_element(); f

6ζ38 − ζ2

8 − 5ζ8 − 6sage: f.norm(KK) == prod([a(f) for a in G_])

Truesage: ff = f.norm(KK);sage: ff, L(ff)(23ζ0 − 25, 23ζ2

8 − 25)

.

Page 20: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Geometry

The ring R is viewed as a lattice by endowing it with the inner product

⟨a, b⟩ =∑

ee(a)e(b) (1)

where e ranges over all the n embeddings K→ C.

This defines a Euclidean norm denoted by ∥ · ∥.

.

Page 21: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Operator’s Norm

• We will make use of the operator’s norm | · | defined by:

|a| = supx∈K∗

∥ax∥/∥x∥ = maxe|e(a)|

where e ranges over all the embeddings.

• It holds that∥a · b∥ ≤ |a| · ∥b∥

and|NK/L(a)| ≤ |a|r ≤ ∥a∥r

.

.

Page 22: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Operator’s Norm

• We will make use of the operator’s norm | · | defined by:

|a| = supx∈K∗

∥ax∥/∥x∥ = maxe|e(a)|

where e ranges over all the embeddings.

• It holds that∥a · b∥ ≤ |a| · ∥b∥

and|NK/L(a)| ≤ |a|r ≤ ∥a∥r

.

.

Page 23: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Lattice Reduction

Lattice reduction algorithms produce vectors of length

βΘ(n/β) · λ1(Λ)

for a computational cost

poly(λ) · 2Θ(β),

with λ1(Λ) the length of a shortest vector of Λ.14

14Yuanmi Chen and Phong Q. Nguyen. BKZ 2.0: Better Lattice Security Estimates. In:ASIACRYPT 2011. Ed. by Dong Hoon Lee and Xiaoyun Wang. Vol. 7073. LNCS. Springer,Heidelberg, Dec. 2011, pp. 1–20.

.

Page 24: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 25: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Overview

K = Q(ζm)

R = Z[ζm]

OOOOOOOOOOO(h, f, g)

��

(x, y) = u · (f, g)

L = Q(ζm′)

Q R′ = Z[ζm′ ]

OOOOOOOOOOO(h′, f′, g′) (h′ → (x′, y′))

OO

Z

PPPPPPPPPPPPPPP

.

Page 26: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

1. Norming Down

Define f′ = NK/L(f), g′ = NK/L(g), and h′ = NK/L(h), then (f′, g′) is avector of Λq

h′ and it may be an unusually short one.

n log q r ∥f∥√

2/3 · n ∥f′∥(√

2/3 · n)r

256 300 8 3.70893 3.70752 29.21967 29.66015256 300 32 3.66546 3.70752 103.69970 118.64060256 300 64 3.71731 3.70752 210.20853 237.28120

Table 1: Observed norms, after relative norm operation. All norms are logs.

.

Page 27: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

1. Norming Down

We assume that the following lemma holds also for all reasonabledistributions considered in cryptographic constructions.

LemmaLet f, g be sampled from continuous spherical Gaussians of variance σ2.For any constant c > 0, there exists a constant C, such that,

∥g′∥ ≤(σnC)r

, ∥f′∥ ≤(σnC)r

, |f′| ≤(σnC)r

, |f′−1| ≤(nC/σ

)r

except with probability O(n−c).

.

Page 28: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

2. Lattice Reduction in the Subfield

Run lattice reduction with block size β on lattice Λqh′ , to obtain a vector

(x′, y′) ∈ Λqh′ with

...

..

2

.

4

.

6

.

8

.

10

.

12

.100 .

120

.

140

.

160

.

180

.

r

.

log∥

(x′ ,

y′)∥

.

∥(x′, y′)∥ ≤ βΘ(2n′/β) · λ1(Λqh′)

.

≤ βΘ(n/(βr)) · ∥(f′, g′)∥

.

≤ βΘ(n/(βr)) · (nσ)o(r)

.

Page 29: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

The Right Kind of (x′, y′)

(x′, y′) is a solution in the subfield, how could that be useful?

1. If (x′, y′) is short enough, then it is an R-multiple of (f′, g′).2. This will allow us to lift (x′, y′) to a short vector in Λq

h.

.

Page 30: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

The Right Kind of (x′, y′)

(x′, y′) is a solution in the subfield, how could that be useful?

1. If (x′, y′) is short enough, then it is an R-multiple of (f′, g′).2. This will allow us to lift (x′, y′) to a short vector in Λq

h.

.

Page 31: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(x′, y′) = v · (f′, g′)

TheoremLet f′, g′ ∈ R′ be such that ⟨f′⟩ and ⟨g′⟩ are coprime ideals and thath′ · f′ = g′ mod q for some h′ ∈ R′. If (x′, y′) ∈ Λq

h′ has length verifying

∥(x′, y′)∥ < q∥(f′, g′)∥ ,

then (x′, y′) = v · (f′, g′) for some v ∈ R′.

.

Page 32: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Proof

1. B = {(f′, g′), (F′,G′)} is a basis of Λqh′ for some (F′,G′)

• By coprimality, there exists (F′,G′) such that f′G′ − g′F′ = q ∈ R.

f′(F′,G′)− F′(f′, g′) = (0, q)g′(F′,G′)− G′(f′, g′) = (−q, 0)

[f′−1]q(f′, g′) = (1, h′) mod q.

• This implies Λqh′ ⊂ M, the module generated by B.

• Because

detL(B) = f′G′ − g′F′ = q = detL({(1, h′), (0, q)})

we have Vol(M) = qn′ = Vol(Λqh′), and therefore M = Λq

h′ .

.

Page 33: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Proof

2. A short enough vector in Λqh′ belongs to Λ = (f′, g′)R′

• Denote the projection of (F′,G′)R orthogonally to Λ as Λ∗.• Let v∗ of length λ∗

1 be a shortest vector of Λ∗.• We have

Vol(Λ) ≤ ∥(f′, g′)∥n′ and Vol(Λ∗) ≤ ∥v∗∥n′

• From Vol(Λ) · Vol(Λ∗) = Vol(Λqh′) = qn′ , we deduce that

λ∗1 = ∥v∗∥ ≥ q

∥(f′, g′)∥ .

• The hypothesis ensures that ∥(x′, y′)∥ < λ∗1 and we conclude that

(x′, y′) ∈ Λ = (f′, g′)R′.

.

Page 34: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Satisfying Conditions of the Theorem

1. The length condition is satisfied asymptotically when

βΘ(n/βr) · (nσ)Θ(r)< q.

2. Heuristically, the probability of satisfying the coprimality conditionfor random f′, g′ is larger than a constant: the density of coprimepairs of ideals15 and elements16 in R is 1/ζK(2) where ζK denotesthe Dedekind zeta function over K.

15Brian D Sittinger. The probability that random algebraic integers are relatively r-prime. In:Journal of Number Theory 130.1 (2010), pp. 164–171.16Andrea Ferraguti and Giacomo Micheli. On The Mertens–Cesàro Theorem for Number Fields.In: Bulletin of the Australian Mathematical Society (2014), pp. 1–12.

.

Page 35: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

3. Lifting the Short Vector

To lift the solution from the sub-ring R′ to R compute (x, y) as

• x = L(x′) and• y = L(y′) · h/L(h′) mod q,

where L is the canonical inclusion map.

.

Page 36: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Rationale

Recall that (x′, y′) = v(f′, g′) and set

• f = L(f′)/f,• g = L(g′)/g and• h = L(h′)/h.

Writex = L(x′) = L(v) · f · f mod q.

and

y = L(y′) · h/L(h′)

= L(v) · L(g′)/h= L(v) · g · g/h= L(v) · f · g mod q.

.

Page 37: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Summary

We have found a short multiple of (f, g):

(x, y) = u · (f, g) ∈ Λqh with u = L(v) · f ∈ R

We have∥(x, y)∥ ≤ |v| · |f|r−1 · ∥(f, g)∥

by writing f as the product of r− 1 many ψ(f) where the ψ’s areautomorphisms of K.

∥(x, y)∥ ≤ |x′| · |f′−1| · |f|r−1 · ∥(f, g)∥

by decomposing v = x′/f′.

∥(x, y)∥ ≤ βΘ(n/(βr)) · (nσ)Θ(r)

by our heuristic.

.

Page 38: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Summary

We have found a short multiple of (f, g):

(x, y) = u · (f, g) ∈ Λqh with u = L(v) · f ∈ R

We have∥(x, y)∥ ≤ |v| · |f|r−1 · ∥(f, g)∥

by writing f as the product of r− 1 many ψ(f) where the ψ’s areautomorphisms of K.

∥(x, y)∥ ≤ |x′| · |f′−1| · |f|r−1 · ∥(f, g)∥

by decomposing v = x′/f′.

∥(x, y)∥ ≤ βΘ(n/(βr)) · (nσ)Θ(r)

by our heuristic.

.

Page 39: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Summary

We have found a short multiple of (f, g):

(x, y) = u · (f, g) ∈ Λqh with u = L(v) · f ∈ R

We have∥(x, y)∥ ≤ |v| · |f|r−1 · ∥(f, g)∥

by writing f as the product of r− 1 many ψ(f) where the ψ’s areautomorphisms of K.

∥(x, y)∥ ≤ |x′| · |f′−1| · |f|r−1 · ∥(f, g)∥

by decomposing v = x′/f′.

∥(x, y)∥ ≤ βΘ(n/(βr)) · (nσ)Θ(r)

by our heuristic.

.

Page 40: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Summary

We have found a short multiple of (f, g):

(x, y) = u · (f, g) ∈ Λqh with u = L(v) · f ∈ R

We have∥(x, y)∥ ≤ |v| · |f|r−1 · ∥(f, g)∥

by writing f as the product of r− 1 many ψ(f) where the ψ’s areautomorphisms of K.

∥(x, y)∥ ≤ |x′| · |f′−1| · |f|r−1 · ∥(f, g)∥

by decomposing v = x′/f′.

∥(x, y)∥ ≤ βΘ(n/(βr)) · (nσ)Θ(r)

by our heuristic.

.

Page 41: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).

• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).

• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 42: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).

• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 43: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).

• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 44: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).

• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 45: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 46: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

(Super-)Exponential q

• Consider n = Θ(λ2 log2 λ) and q = exp(Θ(λ log2 λ)).• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm for recovered vector:

βΘ(n/β) = exp(Θ(λ2 log3 λ/λ)

)> q.

• Subfield attack: set r = Θ(λ) and β = Θ(logλ).• Expected norm for recovered vector:

βΘ(n/βr) · nΘ(r) = exp (Θ(λ logλ log logλ)) < √q.

• There is also a quasi-polynomial version for exponential q.

.

Page 47: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Quasi-polynomial q

• Consider n = Θ(λ logε λ log logλ) and q = exp(Θ(log1+ε λ))

• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm of recovered vector:

βΘ(n/β) = exp(Θ(

log1+ε λ log logλ))

> q.

• Subfield attack: set r = Θ(log2ε/3 λ) and β = Θ(λ/ logε/3 λ).

• Expected norm of recovered vector:

βΘ(n/βr) · nΘ(r) = exp(Θ(

log1+ 23 ε λ log logλ

))<

√q.

.

Page 48: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Quasi-polynomial q

• Consider n = Θ(λ logε λ log logλ) and q = exp(Θ(log1+ε λ))

• Direct lattice attack: reduction up to block-size β = Θ(λ).

• Expected norm of recovered vector:

βΘ(n/β) = exp(Θ(

log1+ε λ log logλ))

> q.

• Subfield attack: set r = Θ(log2ε/3 λ) and β = Θ(λ/ logε/3 λ).

• Expected norm of recovered vector:

βΘ(n/βr) · nΘ(r) = exp(Θ(

log1+ 23 ε λ log logλ

))<

√q.

.

Page 49: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Quasi-polynomial q

• Consider n = Θ(λ logε λ log logλ) and q = exp(Θ(log1+ε λ))

• Direct lattice attack: reduction up to block-size β = Θ(λ).• Expected norm of recovered vector:

βΘ(n/β) = exp(Θ(

log1+ε λ log logλ))

> q.

• Subfield attack: set r = Θ(log2ε/3 λ) and β = Θ(λ/ logε/3 λ).

• Expected norm of recovered vector:

βΘ(n/βr) · nΘ(r) = exp(Θ(

log1+ 23 ε λ log logλ

))<

√q.

.

Page 50: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Quasi-polynomial q

• Consider n = Θ(λ logε λ log logλ) and q = exp(Θ(log1+ε λ))

• Direct lattice attack: reduction up to block-size β = Θ(λ).• Expected norm of recovered vector:

βΘ(n/β) = exp(Θ(

log1+ε λ log logλ))

> q.

• Subfield attack: set r = Θ(log2ε/3 λ) and β = Θ(λ/ logε/3 λ).

• Expected norm of recovered vector:

βΘ(n/βr) · nΘ(r) = exp(Θ(

log1+ 23 ε λ log logλ

))<

√q.

.

Page 51: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Quasi-polynomial q

• Consider n = Θ(λ logε λ log logλ) and q = exp(Θ(log1+ε λ))

• Direct lattice attack: reduction up to block-size β = Θ(λ).• Expected norm of recovered vector:

βΘ(n/β) = exp(Θ(

log1+ε λ log logλ))

> q.

• Subfield attack: set r = Θ(log2ε/3 λ) and β = Θ(λ/ logε/3 λ).• Expected norm of recovered vector:

βΘ(n/βr) · nΘ(r) = exp(Θ(

log1+ 23 ε λ log logλ

))<

√q.

.

Page 52: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 53: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRU-based FHE: LTV

• NTRU-like schemes are used to realise fully homomorphic encryptionstarting with the LTV scheme.17

• LTV can evaluate circuits of depth L = O(nε/ log n) for q = 2nε

with ε ∈ (0, 1) and its decryption circuit can be implemented indepth O(log log q + log n).

• This implies

(ε+ 1) log n < nε/ log n = log q/ log n,

i.e. q is super-polynomial in n for FHE.

17Adriana López-Alt, Eran Tromer, and Vinod Vaikuntanathan. On-the-fly multipartycomputation on the cloud via multikey fully homomorphic encryption. In: 44th ACM STOC.ed. by Howard J. Karloff and Toniann Pitassi. ACM Press, May 2012, pp. 1219–1234.

.

Page 54: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRU-based FHE: YASHE

• YASHE18 reduces noise growth compared to LTV.• This allows f and g to be sampled from a wide Gaussian.• Sampling f and g this way allows to evaluate circuits of depth

L = O(

log qlog log q + log n

).

• Under the same parameters as LTV, YASHE can evaluate circuits ofdepth L = O(log q/log n).

� Usually YASHE uses short f and g, too, and q is super-polynomial in nfor FHE.18Joppe W. Bos, Kristin Lauter, Jake Loftus, and Michael Naehrig. Improved Security for aRing-Based Fully Homomorphic Encryption Scheme. In: 14th IMA International Conference onCryptography and Coding. Ed. by Martijn Stam. Vol. 8308. LNCS. Springer, Heidelberg, Dec.2013, pp. 45–64. doi: 10.1007/978-3-642-45239-0_4.

.

Page 55: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

NTRU-based FHE: Attack

The subfield attack is subexponential in the security parameter λ for LTVand YASHE, if

1. L is sufficiently big to enable fully homomorphic encryption and2. n is chosen to be minimal such that a lattice attack on the full field

does not succeed.

Subfield Attack

Pick β = Θ(λ/log1/3 λ

)and r = Θ

(log 2

3 λ)

to obtain a vector < √q.

.

Page 56: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Graded Encoding Schemes

• Our attack also applies to Graded Encoding Schemes based on ideallattices.19

• In these schemes, short elements mi ∈ Z[X]/(Xn + 1) are encoded as

[(ri · g + mi)/z]q ∈ R/qR

for some ri, g with norms of size poly(λ) and some random z.• For correctness, the latest improvements require a modulus

q = poly(λ)κ, where κ is the multiplication degree.20

19Sanjam Garg, Craig Gentry, and Shai Halevi. Candidate Multilinear Maps from Ideal Lattices.In: EUROCRYPT 2013. Ed. by Thomas Johansson and Phong Q. Nguyen. Vol. 7881. LNCS.Springer, Heidelberg, May 2013, pp. 1–17. doi: 10.1007/978-3-642-38348-9_1.20Martin R. Albrecht, Catalin Cocis, Fabien Laguillaumie, and Adeline Langlois. ImplementingCandidate Graded Encoding Schemes from Ideal Lattices. In: ASIACRYPT 2015, Part II. ed. byTetsu Iwata and Jung Hee Cheon. Vol. 9453. LNCS. Springer, Heidelberg, 2015, pp. 752–775.doi: 10.1007/978-3-662-48800-3_31.

.

Page 57: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Graded Encoding Schemes: Attack

• Given encodings x0 = [(r0 · g + m0)/z]q and x1 = [(r1 · g + m1)/z]qfor unknown m0,m1 = 0 we may consider the NTRU lattice Λq

hwhere h = [x0/x1]q.

• The subfield lattice attack does not yield the vector(r0 · g + m0, r1 · g + m1) but only

u · (r0 · g + m0, r1 · g + m1).

• Two approaches to extend these elements to complete break:1. Solve a principal ideal problem (quantum polynomial-time attack).2. Use statistical leak via the Gentry-Szydlo algorithm21, but this is just

outside reach with current tools.

21Craig Gentry and Michael Szydlo. Cryptanalysis of the Revised NTRU Signature Scheme. In:EUROCRYPT 2002. Ed. by Lars R. Knudsen. Vol. 2332. LNCS. Springer, Heidelberg, 2002,pp. 299–320.

.

Page 58: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Outline

Introduction

Preliminaries

Subfield Lattice Attack

Applications

Conclusions

.

Page 59: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Practicality of the Attack

• We were able to break an instance with parameter n = 212, q ≈ 2190

in practice.• Choosing a relative degree r = 16, the attack required to run LLL in

512 dimensions, which took 120 hours, single-threaded, using Sageand Fplll.

• The direct lattice reduction attack, according to root-hermite-factorbased predictions22, should have required running BKZ withblock-size ≈ 130, and in 8192 dimensions. Such a computation hasnever been reported to have been completed.

22Yuanmi Chen and Phong Q. Nguyen. BKZ 2.0: Better Lattice Security Estimates. In:ASIACRYPT 2011. Ed. by Dong Hoon Lee and Xiaoyun Wang. Vol. 7073. LNCS. Springer,Heidelberg, Dec. 2011, pp. 1–20.

.

Page 60: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Obstructions to Concrete Predictions

There are two issues for predictions of how a given set of parameterswould be affected.

1. We make use of LLL/BKZ in the approximation-factor regime, notin the Hermite-factor regime. While the behavior of LLL/BKZ isquite well modeled in the latter regime, we are not aware of precisemodels for the former.

2. We do not know the actual size of the shortest vector of Λqh′ , all we

know is that it is no larger than (f′, g′).

.

Page 61: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Immunity of NTRU Encryption and BLISS Signature Schemes

• If (f′, g′) is not an unusually short vector of Λqh′ , then lattice

reduction would not recover information on this vector.• This happens when ∥(f′, g′)∥ ≈ σ2 · n′ >

√n′q/πe.

• This is not the case of NTRUencrypt23 or Bliss24, where which(f′, g′) is an unusually short vector, but not by a large factor.

23Jeff Hoffstein et al. Choosing Parameters for NTRUEncrypt. Cryptology ePrint Archive,Report 2015/708. http://eprint.iacr.org/2015/708. 2015.24Léo Ducas, Alain Durmus, Tancrède Lepoint, and Vadim Lyubashevsky. Lattice Signatures andBimodal Gaussians. In: CRYPTO 2013, Part I. ed. by Ran Canetti and Juan A. Garay. Vol. 8042.LNCS. Springer, Heidelberg, Aug. 2013, pp. 40–56. doi: 10.1007/978-3-642-40041-4_3.

.

Page 62: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

When NTRU = Ring-LWE

• If σ = ω(q1/2) then h is statistically close to uniform and NTRU isas secure as Ring-LWE.25

• Immunity to our attack is achieved at σ ≈ Θ(q1/4): h does not haveenough entropy to be statistically close to random.

• But we might have enough entropy for the normed-down public keyh′ to be almost uniform.

25Damien Stehlé and Ron Steinfeld. Making NTRU as Secure as Worst-Case Problems overIdeal Lattices. In: EUROCRYPT 2011. Ed. by Kenneth G. Paterson. Vol. 6632. LNCS. Springer,Heidelberg, May 2011, pp. 27–47.

.

Page 63: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Attacks only get better

It is likely that the attack may be improved.

1. After having found several subfield solutions (x′, y′) = v(f′, g′), runlattice reduction in the lattice f′ · R of dimension n′.

2. Improve lifting step when R′ is a real subfield using theGentry-Syzdlo algorithm26 or by considering the relative normequation problem27 in general.

RecommendationWe therefore recommend that this set-up — NTRU assumption,presence of subfields, large modulus — be considered insecure.

26Craig Gentry and Michael Szydlo. Cryptanalysis of the Revised NTRU Signature Scheme. In:EUROCRYPT 2002. Ed. by Lars R. Knudsen. Vol. 2332. LNCS. Springer, Heidelberg, 2002,pp. 299–320.27Claus Fieker, Andreas Jurk, and M Pohst. On solving relative norm equations in algebraicnumber fields. In: Mathematics of Computation of the American Mathematical Society 66.217(1997), pp. 399–410.

.

Page 64: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Interesting Rings without Subfields

NTRU can is weaker than Ring-LWE in certain case. If you really wantNTRU, you may consider:

R = Z[X]/(Xp − X− 1) as suggested by Berstein,28 but no roots unitynor non-trivial automorphisms. Lead to the design ofNTRUprime29.

K = Q(ζp + ζp) with safe prime p, remains Galois, automorphism groupmay allow a quantum worst-case (Ideal-SVP) toaverage-case reduction, K has no proper subfields.

28Dan Bernstein. A subfield-logarithm attack against ideal lattices.http://blog.cr.yp.to/20140213-ideal.html. 2014.29Daniel J. Bernstein, Chitchanok Chuengsatiansup, Tanja Lange, and Christine van Vredendaal.NTRU Prime. Cryptology ePrint Archive, Report 2016/461. http://eprint.iacr.org/. 2016.

.

Page 65: A subfield lattice attack on overstretched NTRU assumptionsA subfield lattice attack on overstretched NTRU assumptions Cryptanalysis of some FHE and Graded Encoding Schemes. Martin

Fin

Thank YouMartin Albrecht, Shi Bai, and Léo Ducas. A subfield lattice attack onoverstretched NTRU assumptions: Cryptanalysis of some FHE andGraded Encoding Schemes. In: IACR Cryptology ePrint Archive 2016(2016). url: http://ia.cr/2016/127

.