• No results found

MonashUniversity,November2012 DamienStehl´e ComputingwithEuclideanlattices

N/A
N/A
Protected

Academic year: 2021

Share "MonashUniversity,November2012 DamienStehl´e ComputingwithEuclideanlattices"

Copied!
69
0
0

Loading.... (view fulltext now)

Full text

(1)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Computing with Euclidean lattices

Damien Stehl´ e

ENS de Lyon´

Monash University, November 2012

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 1/24

(2)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Goals and plan of the talk

Goals:

An introduction to the computational aspects of lattices An example of how floating-point arithmetic can be used to accelerate an algebraic computation

Plan of the talk:

1

Euclidean lattices

2

Applications of lattices

3

The LLL algorithm

4

Speeding up LLL

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 2/24

(3)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Goals and plan of the talk

Goals:

An introduction to the computational aspects of lattices An example of how floating-point arithmetic can be used to accelerate an algebraic computation

Plan of the talk:

1

Euclidean lattices

2

Applications of lattices

3

The LLL algorithm

4

Speeding up LLL

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 2/24

(4)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Euclidean lattices

Lattice ≡ discrete subgroup of R

n

≡ { P

i ≤n

x

i

b

i

: x

i

∈ Z}

If the b

i

’s are linearly independent, they are called a basis.

Bases are not unique, but they can be obtained from each other by integer transforms of determinant ±1:

 −2 1 10 6



=

 4 −3

2 4



·

 1 1 2 1

 .

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 3/24

(5)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Euclidean lattices

Lattice ≡ discrete subgroup of R

n

≡ { P

i ≤n

x

i

b

i

: x

i

∈ Z}

If the b

i

’s are linearly independent, they are called a basis.

Bases are not unique, but they can be obtained from each other by integer transforms of determinant ±1:

 −2 1 10 6



=

 4 −3

2 4



·

 1 1 2 1

 .

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 3/24

(6)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Euclidean lattices

Lattice ≡ discrete subgroup of R

n

≡ { P

i ≤n

x

i

b

i

: x

i

∈ Z}

If the b

i

’s are linearly independent, they are called a basis.

Bases are not unique, but they can be obtained from each other by integer transforms of determinant ±1:

 −2 1 10 6



=

 4 −3

2 4



·

 1 1 2 1

 .

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 3/24

(7)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Lattice invariants

Minimum:

λ(L) = min(kbk : b ∈ L \ 0) Determinant:

det L = | det(b

i

)

i

|, for any basis Minkowski theorem:

λ(L) ≤ √ n · (det L)

1/n

Algorithmic approach: lattice reduction Start from a basis, and progressively improve its norm/orthogonality

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 4/24

(8)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Lattice invariants

Minimum:

λ(L) = min(kbk : b ∈ L \ 0) Determinant:

det L = | det(b

i

)

i

|, for any basis Minkowski theorem:

λ(L) ≤ √ n · (det L)

1/n

Algorithmic approach: lattice reduction Start from a basis, and progressively improve its norm/orthogonality

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 4/24

(9)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Lattice invariants

Minimum:

λ(L) = min(kbk : b ∈ L \ 0) Determinant:

det L = | det(b

i

)

i

|, for any basis Minkowski theorem:

λ(L) ≤ √ n · (det L)

1/n

Algorithmic approach: lattice reduction Start from a basis, and progressively improve its norm/orthogonality

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 4/24

(10)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Lattice invariants

Minimum:

λ(L) = min(kbk : b ∈ L \ 0) Determinant:

det L = | det(b

i

)

i

|, for any basis Minkowski theorem:

λ(L) ≤ √ n · (det L)

1/n

Algorithmic approach: lattice reduction Start from a basis, and progressively improve its norm/orthogonality

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 4/24

(11)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Why do we care about lattices?

Computer algebra: factorisation of rational polynomials.

Cryptanalysis of variants of RSA.

Lattice-based cryptography.

Communications theory: MIMO, GPS.

Combinatorial optimisation, algorithmic group theory, algorithmic number theory, computer arithmetic, etc.

Lattices tend to pop out when one wants to use linear algebra but is restricted to discrete transformations.

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 5/24

(12)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Why do we care about lattices?

Computer algebra: factorisation of rational polynomials.

Cryptanalysis of variants of RSA.

Lattice-based cryptography.

Communications theory: MIMO, GPS.

Combinatorial optimisation, algorithmic group theory, algorithmic number theory, computer arithmetic, etc.

Lattices tend to pop out when one wants to use linear algebra but is restricted to discrete transformations.

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 5/24

(13)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Main computational problem: SVP

SVP

γ

: Given a basis of L, find b ∈ L with 0 < kbk ≤ γ · λ(L).

Dec-SVP

γ

: Given a basis of L and t > 0, reply:

YES if λ(L) ≤ t and NO if λ(L) > γ · t.

Dec-SVP

γ

on the hardness scale

NP-hard for any γ ≤ O(1), under randomized reductions In NP∩coNP for γ ≥ √ n

In P for γ ≥ 2

nlog log nlog n

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 6/24

(14)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Main computational problem: SVP

SVP

γ

: Given a basis of L, find b ∈ L with 0 < kbk ≤ γ · λ(L).

Dec-SVP

γ

: Given a basis of L and t > 0, reply:

YES if λ(L) ≤ t and NO if λ(L) > γ · t.

Dec-SVP

γ

on the hardness scale

NP-hard for any γ ≤ O(1), under randomized reductions In NP∩coNP for γ ≥ √ n

In P for γ ≥ 2

nlog log nlog n

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 6/24

(15)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Main computational problem: SVP

SVP

γ

: Given a basis of L, find b ∈ L with 0 < kbk ≤ γ · λ(L).

Dec-SVP

γ

: Given a basis of L and t > 0, reply:

YES if λ(L) ≤ t and NO if λ(L) > γ · t.

Dec-SVP

γ

on the hardness scale

NP-hard for any γ ≤ O(1), under randomized reductions In NP∩coNP for γ ≥ √ n

In P for γ ≥ 2

nlog log nlog n

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 6/24

(16)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

b

(0)1

b

(0)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(17)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

b

(0)1

b

(0)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(18)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(1)1

b

(1)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(19)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(1)1

b

(1)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(20)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(2)1

b

(2)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(21)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(2)1

b

(2)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(22)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(3)1

b

(3)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(23)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

SVP is easy in small dimensions!

(0)

b

(3)1

b

(3)2

0

That’s almost Euclid’s algorithm!

Returns a vector reaching λ(L) Runs in polynomial time

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 7/24

(24)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Plan of the talk

Plan of the talk:

1

Euclidean lattices

2

Applications of euclidean lattices

3

The LLL algorithm

4

Speeding up LLL

Integer relation detection Polynomial factorisation Cryptanalysis

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 8/24

(25)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Plan of the talk

Plan of the talk:

1

Euclidean lattices

2

Applications of euclidean lattices

3

The LLL algorithm

4

Speeding up LLL

Integer relation detection Polynomial factorisation Cryptanalysis

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 8/24

(26)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Finding small integer relations between real numbers

BBP formula: π = X

i ≥0

1 16

i

 4

8i + 1 − 2

8i + 4 − 1

8i + 5 − 1 8i + 6



To compute a base-16 digit of π at any given position.

Assume we search a small Z-relation between y

1

, . . . , y

d

∈ R

Take L := L[(b

i

)

i

], with B =

 

 

 

y

1

y

2

. . . y

d

1 0 . . . 0 0 1 . . . 0 .. . . .. ...

0 0 . . . 1

 

 

 

A Z-relation P

x

i

y

i

= 0 leads to a small vector (0, x

1

, . . . , x

d

)

T

Using a large C makes it a shortest vector of L \ 0

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 9/24

(27)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Finding small integer relations between real numbers

BBP formula: π = X

i ≥0

1 16

i

 4

8i + 1 − 2

8i + 4 − 1

8i + 5 − 1 8i + 6



To compute a base-16 digit of π at any given position.

Assume we search a small Z-relation between y

1

, . . . , y

d

∈ R

Take L := L[(b

i

)

i

], with B =

 

 

 

y

1

y

2

. . . y

d

1 0 . . . 0 0 1 . . . 0 .. . . .. ...

0 0 . . . 1

 

 

 

A Z-relation P

x

i

y

i

= 0 leads to a small vector (0, x

1

, . . . , x

d

)

T

Using a large C makes it a shortest vector of L \ 0

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 9/24

(28)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Finding small integer relations between real numbers

BBP formula: π = X

i ≥0

1 16

i

 4

8i + 1 − 2

8i + 4 − 1

8i + 5 − 1 8i + 6



To compute a base-16 digit of π at any given position.

Assume we search a small Z-relation between y

1

, . . . , y

d

∈ R

Take L := L[(b

i

)

i

], with B =

 

 

 

y

1

y

2

. . . y

d

1 0 . . . 0 0 1 . . . 0 .. . . .. ...

0 0 . . . 1

 

 

 

A Z-relation P

x

i

y

i

= 0 leads to a small vector (0, x

1

, . . . , x

d

)

T

Using a large C makes it a shortest vector of L \ 0

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 9/24

(29)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Finding small integer relations between real numbers

BBP formula: π = X

i ≥0

1 16

i

 4

8i + 1 − 2

8i + 4 − 1

8i + 5 − 1 8i + 6



To compute a base-16 digit of π at any given position.

Assume we search a small Z-relation between y

1

, . . . , y

d

∈ R

Take L := L[(b

i

)

i

], with B =

 

 

 

y

1

y

2

. . . y

d

1 0 . . . 0 0 1 . . . 0 .. . . .. ...

0 0 . . . 1

 

 

 

A Z-relation P

x

i

y

i

= 0 leads to a small vector (0, x

1

, . . . , x

d

)

T

Using a large C makes it a shortest vector of L \ 0

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 9/24

(30)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Finding small integer relations between real numbers

BBP formula: π = X

i ≥0

1 16

i

 4

8i + 1 − 2

8i + 4 − 1

8i + 5 − 1 8i + 6



To compute a base-16 digit of π at any given position.

Assume we search a small Z-relation between y

1

, . . . , y

d

∈ R

Take L := L[(b

i

)

i

], with B =

 

 

 

C y

1

C y

2

. . . C y

d

1 0 . . . 0

0 1 . . . 0

.. . . .. .. .

0 0 . . . 1

 

 

 

A Z-relation P

x

i

y

i

= 0 leads to a small vector (0, x

1

, . . . , x

d

)

T

Using a large C makes it a shortest vector of L \ 0

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 9/24

(31)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Factoring integer polynomials

The previous idea may be used to factor polynomials in Z[x]

Factoring polynomials with rational coefficients,

A. K. Lenstra, H. W. Lenstra Jr. and L. Lov´ asz. Math. Ann., 1982

⇒ Cited ≥ 2500 times!!!

Given P ∈ Z[x]:

0- If deg P ≤ 1, then stop 1- Compute a root α ∈ C of P

2- Find the minimal polynomial P

α

(x) of α, by searching for Z-combinations between 1, α, . . . , α

i

for increasing i 3- Divide P by P

α

and restart

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 10/24

(32)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Factoring integer polynomials

The previous idea may be used to factor polynomials in Z[x]

Factoring polynomials with rational coefficients,

A. K. Lenstra, H. W. Lenstra Jr. and L. Lov´ asz. Math. Ann., 1982

⇒ Cited ≥ 2500 times!!!

Given P ∈ Z[x]:

0- If deg P ≤ 1, then stop 1- Compute a root α ∈ C of P

2- Find the minimal polynomial P

α

(x) of α, by searching for Z-combinations between 1, α, . . . , α

i

for increasing i 3- Divide P by P

α

and restart

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 10/24

(33)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Cryptographic design and cryptanalysis

Lattice-based cryptography:

Secret key: very short basis of a lattice Public key: long basis of the same lattice Relies on the assumed hardness of SVP Very popular research topic:

More secure: post-quantum

More efficient: no modular exponentiation More versatile: fully homomorphic encryption

Lattice reduction algorithms are the best known attack.

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 11/24

(34)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Cryptographic design and cryptanalysis

Lattice-based cryptography:

Secret key: very short basis of a lattice Public key: long basis of the same lattice Relies on the assumed hardness of SVP Very popular research topic:

More secure: post-quantum

More efficient: no modular exponentiation More versatile: fully homomorphic encryption

Lattice reduction algorithms are the best known attack.

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 11/24

(35)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Cryptographic design and cryptanalysis

Lattice-based cryptography:

Secret key: very short basis of a lattice Public key: long basis of the same lattice Relies on the assumed hardness of SVP Very popular research topic:

More secure: post-quantum

More efficient: no modular exponentiation More versatile: fully homomorphic encryption

Lattice reduction algorithms are the best known attack.

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 11/24

(36)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Plan of the talk

Plan of the talk:

1

Euclidean lattices

2

Applications of euclidean lattices

3

The LLL algorithm

4

Speeding up LLL

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 12/24

(37)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Gram-Schmidt orthogonalization (GSO)

(b

i

)

i

linearly independent The GSO (b

i

)

i

is defined by:

∀i : b

i

= b

i

− X

j<i

µ

ij

b

j

∀i > j : µ

ij

= (b

i

, b

j

) kb

j

k

2

Triangularisation of B = (b

i

)

i

b2 b3

b1

For any basis (b

i

)

i

of L, we have λ(L) ≥ min

i

kb

i

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 13/24

(38)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Gram-Schmidt orthogonalization (GSO)

(b

i

)

i

linearly independent The GSO (b

i

)

i

is defined by:

∀i : b

i

= b

i

− X

j<i

µ

ij

b

j

∀i > j : µ

ij

= (b

i

, b

j

) kb

j

k

2

Triangularisation of B = (b

i

)

i

=

b2 b3

b2 b3

b1 b1

For any basis (b

i

)

i

of L, we have λ(L) ≥ min

i

kb

i

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 13/24

(39)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Gram-Schmidt orthogonalization (GSO)

(b

i

)

i

linearly independent The GSO (b

i

)

i

is defined by:

∀i : b

i

= b

i

− X

j<i

µ

ij

b

j

∀i > j : µ

ij

= (b

i

, b

j

) kb

j

k

2

Triangularisation of B = (b

i

)

i

=

b2 b3

b2 b3

b1 b1

For any basis (b

i

)

i

of L, we have λ(L) ≥ min

i

kb

i

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 13/24

(40)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Gram-Schmidt orthogonalization (GSO)

(b

i

)

i

linearly independent The GSO (b

i

)

i

is defined by:

∀i : b

i

= b

i

− X

j<i

µ

ij

b

j

∀i > j : µ

ij

= (b

i

, b

j

) kb

j

k

2

Triangularisation of B = (b

i

)

i

=

b2 b3

b2 b3

b1 b1

For any basis (b

i

)

i

of L, we have λ(L) ≥ min

i

kb

i

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 13/24

(41)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz reduction

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 14/24

(42)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz reduction

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

The kb

i

k’s can’t drop too fast:

∀i : kb

i+1

k

2

≥ (δ −

14

)kb

i

k

2

⇒ λ(L) ≤ kb

1

k ≤ 2

O(n)

· λ(L)

δ < 1 is important to get a polynomial complexity

00000 00000 00000 00000 00000 11111 11111 11111 11111 11111

00000 00000 00000 00000 11111 11111 11111 11111

0 b

1

b

2

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 14/24

(43)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz reduction

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

The kb

i

k’s can’t drop too fast:

∀i : kb

i+1

k

2

≥ (δ −

14

)kb

i

k

2

⇒ λ(L) ≤ kb

1

k ≤ 2

O(n)

· λ(L)

δ < 1 is important to get a polynomial complexity

00000 00000 00000 00000 00000 11111 11111 11111 11111 11111

00000 00000 00000 00000 11111 11111 11111 11111

0 b

1

b

2

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 14/24

(44)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz reduction

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

The kb

i

k’s can’t drop too fast:

∀i : kb

i+1

k

2

≥ (δ −

14

)kb

i

k

2

⇒ λ(L) ≤ kb

1

k ≤ 2

O(n)

· λ(L)

δ < 1 is important to get a polynomial complexity

00000 00000 00000 00000 00000 11111 11111 11111 11111 11111

00000 00000 00000 00000 11111 11111 11111 11111

0 b

1

b

2

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 14/24

(45)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz reduction

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

The kb

i

k’s can’t drop too fast:

∀i : kb

i+1

k

2

≥ (δ −

14

)kb

i

k

2

⇒ λ(L) ≤ kb

1

k ≤ 2

O(n)

· λ(L)

δ < 1 is important to get a polynomial complexity

00000 00000 00000 00000 00000 00000

11111 11111 11111 11111 11111 11111

00000 00000 00000 00000 11111 11111 11111 11111

0 b

1

b

2

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 14/24

(46)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz algorithm

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

1

Enforce size-reduction, using a modified Gaussian elimination

2

If there is an i with δ · kb

i

k

2

> kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2

, then swap b

i

and b

i+1

, and go to Step 1

3

Return the current basis (b

1

, . . . , b

n

)

⇒ Correctness is trivial

⇒ Termination is much less so:

O(n

2

β) loop iterations, with β = max

i

kb

initi

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 15/24

(47)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz algorithm

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

1

Enforce size-reduction, using a modified Gaussian elimination

2

If there is an i with δ · kb

i

k

2

> kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2

, then swap b

i

and b

i+1

, and go to Step 1

3

Return the current basis (b

1

, . . . , b

n

)

⇒ Correctness is trivial

⇒ Termination is much less so:

O(n

2

β) loop iterations, with β = max

i

kb

initi

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 15/24

(48)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

The Lenstra-Lenstra-Lov´asz algorithm

Let δ ∈ (1/4, 1). A basis B = (b

i

)

i ≤n

∈ R

n×n

is said LLL-reduced if

∀i, j : |µ

ij

| ≤ 1/2

[Size-reduction]

∀i : δ · kb

i

k

2

≤ kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2 [Lov´asz’ condition]

1

Enforce size-reduction, using a modified Gaussian elimination

2

If there is an i with δ · kb

i

k

2

> kb

i+1

k

2

+ µ

2i+1,i

kb

i

k

2

, then swap b

i

and b

i+1

, and go to Step 1

3

Return the current basis (b

1

, . . . , b

n

)

⇒ Correctness is trivial

⇒ Termination is much less so:

O(n

2

β) loop iterations, with β = max

i

kb

initi

k

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 15/24

(49)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Bit-complexity of LLL and practical run-time

[LLL82,Kaltofen83]

LLL terminates in O(n

4

β

2

(n + β)) operations, with β = log max

i

kb

initi

k With MAGMA V2.16:

> n := 25; B := RMatrixSpace(Integers(),n,n)!0;

> for i:=1 to 25 do

> B[i][i]:=1; B[i][1]:=RandomBits(2000);

> end for;

> time C := LLL(B:Method:=‘‘Integral’’);

Time: 11.700

> time C := LLL(B);

Time: 0.240

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 16/24

(50)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Plan of the talk

Plan of the talk:

1

Euclidean lattices

2

Applications of euclidean lattices

3

The LLL algorithm

4

Speeding up LLL

Section based on joint works with X.-W. Chang, I. Morel, P. Q. Nguyen, A. Novocin, X. Pujol and G. Villard

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 17/24

(51)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

LLL in practice: the numeric-symbolic approach

The Gram-Schmidt computations dominate the cost Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Floating-point numbers: x

1

.x

2

x

3

. . . x

p

· B

e

, where:

p is the precision

B is the base, and x

i

∈ {0, . . . , B − 1}

e ∈ Z is the exponent Floating-point arithmetic:

fl (a op b) is a nearest fp number to a op b, for any op ∈ {+, −, /, ×}

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 18/24

(52)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

LLL in practice: the numeric-symbolic approach

The Gram-Schmidt computations dominate the cost Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Floating-point numbers: x

1

.x

2

x

3

. . . x

p

· B

e

, where:

p is the precision

B is the base, and x

i

∈ {0, . . . , B − 1}

e ∈ Z is the exponent Floating-point arithmetic:

fl (a op b) is a nearest fp number to a op b, for any op ∈ {+, −, /, ×}

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 18/24

(53)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

LLL in practice: the numeric-symbolic approach

The Gram-Schmidt computations dominate the cost Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Floating-point numbers: x

1

.x

2

x

3

. . . x

p

· B

e

, where:

p is the precision

B is the base, and x

i

∈ {0, . . . , B − 1}

e ∈ Z is the exponent Floating-point arithmetic:

fl (a op b) is a nearest fp number to a op b, for any op ∈ {+, −, /, ×}

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 18/24

(54)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Odlyzko’s hybrid approach is only heuristic

Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Principle: For p small, fp arith. may efficiently simulate rational arith.

⇒ In practice: we aim for 53-bit machine precision But Odlyzko’s approach is heuristic:

Fp arithmetic is inexact Small errors can be amplified

⇒ Infinite loops

⇒ Incorrect outputs

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 19/24

(55)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Odlyzko’s hybrid approach is only heuristic

Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Principle: For p small, fp arith. may efficiently simulate rational arith.

⇒ In practice: we aim for 53-bit machine precision But Odlyzko’s approach is heuristic:

Fp arithmetic is inexact Small errors can be amplified

⇒ Infinite loops

⇒ Incorrect outputs

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 19/24

(56)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Odlyzko’s hybrid approach is only heuristic

Odlyzko’s hybrid approach

Replace the rational computations on the GSO by floating-point approximations, but keep the basis operations exact

Principle: For p small, fp arith. may efficiently simulate rational arith.

⇒ In practice: we aim for 53-bit machine precision But Odlyzko’s approach is heuristic:

Fp arithmetic is inexact Small errors can be amplified

⇒ Infinite loops

⇒ Incorrect outputs

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 19/24

(57)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Making the numeric-symbolic approach rigorous

Underlying mathematical phenomenon

[CSV12]

Any LLL-reduced basis is well-conditioned with respect to GSO Well-conditioned? The GSO computed in small precision is close to the genuine GSO

⇒ We’d like to rely on LLL-reduced bases as much as we can Use a greedy LLL algorithm

[NS05,MSV09]

:

Consider the first i s.t. b

1

, . . . , b

i

is not LLL-reduced

⇒ b

1

, . . . , b

i −1

is well-conditioned

Iterate on b

i

until nothing happens (iterative refinement)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 20/24

(58)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Making the numeric-symbolic approach rigorous

Underlying mathematical phenomenon

[CSV12]

Any LLL-reduced basis is well-conditioned with respect to GSO Well-conditioned? The GSO computed in small precision is close to the genuine GSO

⇒ We’d like to rely on LLL-reduced bases as much as we can Use a greedy LLL algorithm

[NS05,MSV09]

:

Consider the first i s.t. b

1

, . . . , b

i

is not LLL-reduced

⇒ b

1

, . . . , b

i −1

is well-conditioned

Iterate on b

i

until nothing happens (iterative refinement)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 20/24

(59)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Bit complexity of floating-point LLL

Small precision? O(n) bits suffice for correctness.

Bit-complexity:

O(n

2

β)

| {z }

1

· O(n

2

)

| {z }

2

·

 O(nβ)

| {z }

3

+ O(n

2

)

| {z }

4



= O n

5

β(n + β)  .

1

loop iterations

2

size-reduction arithmetic steps

3

integer arithmetic

4

floating-point arithmetic

Asymptotically not much better than LLL’s O(n

4

β

2

(n + β)), but much better in practice

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 21/24

(60)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Bit complexity of floating-point LLL

Small precision? O(n) bits suffice for correctness.

Bit-complexity:

O(n

2

β)

| {z }

1

· O(n

2

)

| {z }

2

·

 O(nβ)

| {z }

3

+ O(n

2

)

| {z }

4



= O n

5

β(n + β)  .

1

loop iterations

2

size-reduction arithmetic steps

3

integer arithmetic

4

floating-point arithmetic

Asymptotically not much better than LLL’s O(n

4

β

2

(n + β)), but much better in practice

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 21/24

(61)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Can we do better?

[NSV10,PSV13?]

The totally numeric approach

LLL can be accelerated further by using approximations for the bases too!

⇒ e O(n

5

β

1.5

) operations

The totally numeric approach, continued Do the same with several levels of recursion

⇒ e O(n

5

β) operations

The totally numeric approach with blocking Consider sub-matrices of the GSO

⇒ e O(n

4

β) operations

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 22/24

(62)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Can we do better?

[NSV10,PSV13?]

The totally numeric approach

LLL can be accelerated further by using approximations for the bases too!

⇒ e O(n

5

β

1.5

) operations

The totally numeric approach, continued Do the same with several levels of recursion

⇒ e O(n

5

β) operations

The totally numeric approach with blocking Consider sub-matrices of the GSO

⇒ e O(n

4

β) operations

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 22/24

(63)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Can we do better?

[NSV10,PSV13?]

The totally numeric approach

LLL can be accelerated further by using approximations for the bases too!

⇒ e O(n

5

β

1.5

) operations

The totally numeric approach, continued Do the same with several levels of recursion

⇒ e O(n

5

β) operations

The totally numeric approach with blocking Consider sub-matrices of the GSO

⇒ e O(n

4

β) operations

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 22/24

(64)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Plan of the talk

Plan of the talk:

1

Euclidean lattices

2

Applications of euclidean lattices

3

The LLL algorithm

4

Speeding up LLL

5

Conclusion

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 23/24

(65)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Open problems

On LLL:

Lower the cost further: as fast as matrix multiplication?

Improve current implementations In the general area of lattices

Faster algorithms computing shorter vectors than LLL Quantum algorithms

Hardness proofs for worst-case lattice problems Hardness proofs for average-case lattice problems (crucial for lattice-based cryptography)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 24/24

(66)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Open problems

On LLL:

Lower the cost further: as fast as matrix multiplication?

Improve current implementations In the general area of lattices

Faster algorithms computing shorter vectors than LLL Quantum algorithms

Hardness proofs for worst-case lattice problems Hardness proofs for average-case lattice problems (crucial for lattice-based cryptography)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 24/24

(67)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Open problems

On LLL:

Lower the cost further: as fast as matrix multiplication?

Improve current implementations In the general area of lattices

Faster algorithms computing shorter vectors than LLL Quantum algorithms

Hardness proofs for worst-case lattice problems Hardness proofs for average-case lattice problems (crucial for lattice-based cryptography)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 24/24

(68)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Open problems

On LLL:

Lower the cost further: as fast as matrix multiplication?

Improve current implementations In the general area of lattices

Faster algorithms computing shorter vectors than LLL Quantum algorithms

Hardness proofs for worst-case lattice problems Hardness proofs for average-case lattice problems (crucial for lattice-based cryptography)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 24/24

(69)

Euclidean lattices Applications of lattices The LLL algorithm A numeric-symbolic LLL Conclusion

Open problems

On LLL:

Lower the cost further: as fast as matrix multiplication?

Improve current implementations In the general area of lattices

Faster algorithms computing shorter vectors than LLL Quantum algorithms

Hardness proofs for worst-case lattice problems Hardness proofs for average-case lattice problems (crucial for lattice-based cryptography)

Damien Stehl´e Computing with Euclidean lattices 01/11/2012 24/24

References

Related documents