Lattice Basis Reduction Part II: Algorithms Sanzheng Qiao - - PowerPoint PPT Presentation

lattice basis reduction part ii algorithms
SMART_READER_LITE
LIVE PREVIEW

Lattice Basis Reduction Part II: Algorithms Sanzheng Qiao - - PowerPoint PPT Presentation

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement Lattice Basis Reduction Part II: Algorithms Sanzheng Qiao Department of Computing and Software McMaster University, Canada qiao@mcmaster.ca


slide-1
SLIDE 1

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Lattice Basis Reduction Part II: Algorithms

Sanzheng Qiao

Department of Computing and Software McMaster University, Canada qiao@mcmaster.ca www.cas.mcmaster.ca/˜qiao

November 8, 2011, revised February 2012 Joint work with W. Zhang and Y. Wei, Fudan University

slide-2
SLIDE 2

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-3
SLIDE 3

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-4
SLIDE 4

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Hermite reduction (size reduction)

Hermite-reduced A lattice basis {b1, b2, . . . , bn} is called size-reduced if its QR decomposition satisfies |ri,i| ≥ 2|ri,j|, for all 1 ≤ i < j ≤ n,

slide-5
SLIDE 5

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Hermite reduction (size reduction)

Hermite-reduced A lattice basis {b1, b2, . . . , bn} is called size-reduced if its QR decomposition satisfies |ri,i| ≥ 2|ri,j|, for all 1 ≤ i < j ≤ n, Procedure Reduce(i, j) ri,i ri,j rj,j 1 − ri,j

ri,i

  • 1
  • =
  • ri,i

ri,j − ri,i ri,j

ri,i

  • rj,j
  • |ri,i| ≥ 2
  • ri,j − ri,i

ri,j

ri,i

slide-6
SLIDE 6

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Gauss reduction

A unimodular transformation 1 −µ 1

  • r
  • 1

−µ 1

  • Also called

Integer Gauss transformation Integer elementary matrix

slide-7
SLIDE 7

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-8
SLIDE 8

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL reduction

LLL-reduced A lattice basis {b1, b2, . . . , bn} is called LLL-reduced if it is size-reduced and R in the QR decomposition satisfies r2

i+1,i+1 + r2 i,i+1 ≥ ω r2 i,i

slide-9
SLIDE 9

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL reduction

LLL-reduced A lattice basis {b1, b2, . . . , bn} is called LLL-reduced if it is size-reduced and R in the QR decomposition satisfies r2

i+1,i+1 + r2 i,i+1 ≥ ω r2 i,i

Procedure SwapRestore(i) Find a Givens plane rotation G: G ri−1,i−1 ri−1,i ri,i 1 1

  • =

ˆ ri−1,i−1 ˆ ri−1,i ˆ ri,i

  • .

Unimodular transformation: Permutation

slide-10
SLIDE 10

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL algorithm

k = 2; while k <= n { if |r(k-1,k) / r(k-1,k-1)| > 1/2 if r(k,k)ˆ2 + r(k-1,k)ˆ2 < w*r(k-1,k-1)ˆ2 { } else { } }

slide-11
SLIDE 11

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL algorithm

k = 2; while k <= n { if |r(k-1,k) / r(k-1,k-1)| > 1/2 Reduce(k-1,k); if r(k,k)ˆ2 + r(k-1,k)ˆ2 < w*r(k-1,k-1)ˆ2 { } else { } }

slide-12
SLIDE 12

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL algorithm

k = 2; while k <= n { if |r(k-1,k) / r(k-1,k-1)| > 1/2 Reduce(k-1,k); if r(k,k)ˆ2 + r(k-1,k)ˆ2 < w*r(k-1,k-1)ˆ2 { SwapRestore(k); k = max(k-1, 2); } else { } }

slide-13
SLIDE 13

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL algorithm

k = 2; while k <= n { if |r(k-1,k) / r(k-1,k-1)| > 1/2 Reduce(k-1,k); if r(k,k)ˆ2 + r(k-1,k)ˆ2 < w*r(k-1,k-1)ˆ2 { SwapRestore(k); k = max(k-1, 2); } else { for i = k-2 downto 1 if |r(i,k) / r(i,i)| > 1/2 Reduce(i,k); k = k+1; } }

slide-14
SLIDE 14

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

LLL algorithm

k = 2; while k <= n { if |r(k-1,k) / r(k-1,k-1)| > 1/2 Reduce(k-1,k); if r(k,k)ˆ2 + r(k-1,k)ˆ2 < w*r(k-1,k-1)ˆ2 { SwapRestore(k); k = max(k-1, 2); } else { for i = k-2 downto 1 if |r(i,k) / r(i,i)| > 1/2 Reduce(i,k); k = k+1; } }

Redundant size reductions.

slide-15
SLIDE 15

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

An improvement: Delayed size reduction

k = 2; while k <= n g = round(r(k-1,k) / r(k-1,k-1)); if r(k,k)ˆ2 + (r(k-1,k) - g*r(k-1,k-1))ˆ2 < w*r(k-1,k-1)ˆ2 ReduceSwapRestore(k); k = max(k-1, 2); else k = k + 1; for k = 2 to n for i = k-1 downto 1 if |r(i,k) / r(i,i)| > 1/2 Reduce(i,k);

slide-16
SLIDE 16

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

An improvement: Delayed size reduction

k = 2; while k <= n g = round(r(k-1,k) / r(k-1,k-1)); if r(k,k)ˆ2 + (r(k-1,k) - g*r(k-1,k-1))ˆ2 < w*r(k-1,k-1)ˆ2 ReduceSwapRestore(k); k = max(k-1, 2); else k = k + 1; for k = 2 to n for i = k-1 downto 1 if |r(i,k) / r(i,i)| > 1/2 Reduce(i,k);

Produces identical results at 50% cost.

slide-17
SLIDE 17

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-18
SLIDE 18

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

HKZ reduction

HKZ-reduced A lattice basis {b1, b2, . . . , bn} is called HKZ-reduced if it is size-reduced and for each trailing (n − i + 1) × (n − i + 1), 1 ≤ i < n, submatrix of R in the QR decomposition, its first column is a shortest nonzero vector in the lattice generated by the submatrix.

slide-19
SLIDE 19

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

HKZ reduction

HKZ-reduced A lattice basis {b1, b2, . . . , bn} is called HKZ-reduced if it is size-reduced and for each trailing (n − i + 1) × (n − i + 1), 1 ≤ i < n, submatrix of R in the QR decomposition, its first column is a shortest nonzero vector in the lattice generated by the submatrix. Two problems Shortest vector problem (SVP) Expansion to a basis

slide-20
SLIDE 20

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

SVP

min

z

Bz2

2

slide-21
SLIDE 21

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

SVP

min

z

Bz2

2

Sphere decoding Determine a search sphere Bz2

2 ≤ ρ2

slide-22
SLIDE 22

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

SVP

min

z

Bz2

2

Sphere decoding Determine a search sphere Bz2

2 ≤ ρ2

A simple choice of ρ: the length of the first (or shortest) column

  • f B.
slide-23
SLIDE 23

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

Rz =   4 1 5 4 4 3     z1 z2 z3   ρ = 4

slide-24
SLIDE 24

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

Rz =   4 1 5 4 4 3     z1 z2 z3   ρ = 4 A necessary condition for z3: |3z3| ≤ 4. Possible values of z3: 0, −1, 1

slide-25
SLIDE 25

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

For each possible values of z3, say z3 = 0, Rz =   4 1 5 4 4 3     z1 z2 z3   =   4 1 4   z1 z2

  • + 0

  5 4 3   The problem size is reduced.

slide-26
SLIDE 26

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

For each possible values of z3, say z3 = 0, Rz =   4 1 5 4 4 3     z1 z2 z3   =   4 1 4   z1 z2

  • + 0

  5 4 3   The problem size is reduced. The necessary condition for z2: |4z2| ≤ 4 Possible values of z2: 0, −1, 1

slide-27
SLIDE 27

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

The search tree −1 1 z z z −1 1 1 −1 −1 1 1

3 2 1

The solution Rz =   4 1 5 4 4 3     1 1 −1   =   −3  

slide-28
SLIDE 28

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Expanding to a basis

Problem: Transform the basis matrix A =   4 1 5 4 4 3   into a new basis matrix whose first column is the shortest vector Az =   −3  

slide-29
SLIDE 29

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Expanding to a basis

Problem: Transform the basis matrix A =   4 1 5 4 4 3   into a new basis matrix whose first column is the shortest vector Az =   −3   That is, find a unimodular matrix Z: Az = AZe1 or z = Ze1, Z −1z = e1 Unimodular transformation that introduces zeros into an integer vector.

slide-30
SLIDE 30

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

A plane unimodular transformation

A unimodular transformation (Luk, Zhang, and Q, 2010). gcd(p, q) = ±d, ap + bq = ±d. Form the unimodular matrix

  • a

b −q/d p/d p q

  • =

d

slide-31
SLIDE 31

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

A plane unimodular transformation

A unimodular transformation (Luk, Zhang, and Q, 2010). gcd(p, q) = ±d, ap + bq = ±d. Form the unimodular matrix

  • a

b −q/d p/d p q

  • =

d

  • Its inverse

p/d −b q/d a

slide-32
SLIDE 32

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

  1 1 1 1     1 1 −1   =   1 1     4 1 5 4 4 3     1 1 −1 1   =   4 −4 5 4 −3 3  

slide-33
SLIDE 33

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Example

  1 −1 1 1     1 1   =   1     4 −4 5 4 −3 3     1 1 1 1   =   −4 5 4 −3 −3 3  

slide-34
SLIDE 34

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Improving Kannan’s algorithm

Kannan, 1987 Expansion method In the kth, k = 1, ..., n, recursion, solve a k-dim system (O(k3)). Total O(n4)

slide-35
SLIDE 35

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Improving Kannan’s algorithm

Kannan, 1987 Expansion method In the kth, k = 1, ..., n, recursion, solve a k-dim system (O(k3)). Total O(n4) Determine whether a set of vectors are linearly dependent.

slide-36
SLIDE 36

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Improving Kannan’s algorithm

Kannan, 1987 Expansion method In the kth, k = 1, ..., n, recursion, solve a k-dim system (O(k3)). Total O(n4) Determine whether a set of vectors are linearly dependent. Our method Efficient, O(n2) Accurate, unimodular (integer) transformations.

slide-37
SLIDE 37

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Properties

Efficient. Exact, integer arithmetic. Include permutation and identity as special cases. Can triangularize an integer matrix. Any unimodular can be decomposed into a product of this plan unimodular and integer Gauss transformations.

slide-38
SLIDE 38

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Application

Cryptography Find a large vector v =   997 1234 56789   , gcd(vi) = 1

slide-39
SLIDE 39

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Application

Cryptography Find a large vector v =   997 1234 56789   , gcd(vi) = 1 Determine a unimodular matrix Z −1v =   997 −1 1234 −543 6789 −24989  

−1

v =   1   cond(Z) = 1.55 × 1012

slide-40
SLIDE 40

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Application

Cryptography Find a large vector v =   997 1234 56789   , gcd(vi) = 1 Determine a unimodular matrix Z −1v =   997 −1 1234 −543 6789 −24989  

−1

v =   1   cond(Z) = 1.55 × 1012 Choose a diagonal A as a private key B = AZ (ill-conditioned) as public key

slide-41
SLIDE 41

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-42
SLIDE 42

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Minkowski reduction

Minkowski-reduced A lattice basis {b1, b2, . . . , bn} is called Minkowski-reduced if for each bi, i = 1, 2, . . . , n, its length ||bi||2 = min(||ˆ bi||2, ||ˆ bi+1||2, . . . , ||ˆ bn||2)

  • ver all sets {ˆ

bi, ˆ bi+1, . . . , ˆ bn} of lattice points such that {b1, b2, . . . , bi−1, ˆ bi, ˆ bi+1, . . . , ˆ bn} form a basis for the lattice.

slide-43
SLIDE 43

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Existing Minkowski reduction algorithms

Lagrange, 1773, dimension two Semaev, 2001, dimension three Nguyen and Stehle´ e, 2009, dimension four Afflerbach and Grothe, 1985, up to dimension seven Helfrish, 1985, theoretical value, very expensive

slide-44
SLIDE 44

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Existing Minkowski reduction algorithms

Lagrange, 1773, dimension two Semaev, 2001, dimension three Nguyen and Stehle´ e, 2009, dimension four Afflerbach and Grothe, 1985, up to dimension seven Helfrish, 1985, theoretical value, very expensive Zhang, Q, Wei, 2011

slide-45
SLIDE 45

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Problem

For p = 1, 2, ..., n, find bp: a shortest vector such that {b1, ..., bp} can be extended to a basis for the lattice.

slide-46
SLIDE 46

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Problem

For p = 1, 2, ..., n, find bp: a shortest vector such that {b1, ..., bp} can be extended to a basis for the lattice. Algorithm: for p = 1...n find a shortest v = Bz such that {b1, ..., bp−1, v} is expandable to a basis; set bp = v and expand {b1, ..., bp} to a basis; end

slide-47
SLIDE 47

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Minkowski reduction algorithm

A proposition: Let B = [b1, ..., bn] be a generator matrix for a lattice L and a lattice vector v = Bz, then {b1, ..., bp−1, v} is expandable to a basis for L if and only if gcd(zp, ..., zn) = ±1.

slide-48
SLIDE 48

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Minkowski reduction algorithm

A proposition: Let B = [b1, ..., bn] be a generator matrix for a lattice L and a lattice vector v = Bz, then {b1, ..., bp−1, v} is expandable to a basis for L if and only if gcd(zp, ..., zn) = ±1. Constrained minimization problem: min

z Bz2

subject to gcd(zp, ..., zn) = ±1

slide-49
SLIDE 49

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Minkowski reduction algorithm

A proposition: Let B = [b1, ..., bn] be a generator matrix for a lattice L and a lattice vector v = Bz, then {b1, ..., bp−1, v} is expandable to a basis for L if and only if gcd(zp, ..., zn) = ±1. Constrained minimization problem: min

z Bz2

subject to gcd(zp, ..., zn) = ±1 Modified sphere decoding: While searching for short lattice vectors, enforce the condition gcd(zp, ..., zn) = ±1.

slide-50
SLIDE 50

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Outline

1

Hermite Reduction

2

LLL Reduction

3

HKZ Reduction

4

Minkowski Reduction

5

A Measurement

slide-51
SLIDE 51

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”.

slide-52
SLIDE 52

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”. How do we measure the degree of orthogonality of a basis?

slide-53
SLIDE 53

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”. How do we measure the degree of orthogonality of a basis? Usual choice: condition number of matrix.

slide-54
SLIDE 54

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”. How do we measure the degree of orthogonality of a basis? Usual choice: condition number of matrix. Consider the matrix 1 10k

  • .
slide-55
SLIDE 55

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”. How do we measure the degree of orthogonality of a basis? Usual choice: condition number of matrix. Consider the matrix 1 10k

  • .

Its condition number is 10k, but the columns are orthogonal.

slide-56
SLIDE 56

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measuring orthogonality

Lattice reduction is to transform a lattice basis into another that becomes “more orthogonal”. How do we measure the degree of orthogonality of a basis? Usual choice: condition number of matrix. Consider the matrix 1 10k

  • .

Its condition number is 10k, but the columns are orthogonal. Condition # ignores intermediate singular values of n ×n matrix.

slide-57
SLIDE 57

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

An interpretation

    r1,1 r1,2 r1,3 r1,4 r2,2 r2,3 r2,4 r3,3 r3,4 r4,4     sin θi = |ri,i| r:,i2

slide-58
SLIDE 58

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measurement

In particular, the geometric mean σ: σn =

n

  • i=1

sin θi =

n

  • i=1

|ri,i| r:,i2 = d(L) n

i=1 bi2

Hadamard’s inequality det(B) ≤

n

  • i=1

bi2 The equality holds if and only if bi are orthogonal. Also called Hadamard ratio or orthogonality defect.

slide-59
SLIDE 59

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measurement

Note that 0 ≤ σ ≤ 1, σ = 1 for any diagonal matrix, and σ = 0 for any singular matrix.

slide-60
SLIDE 60

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measurement

Note that 0 ≤ σ ≤ 1, σ = 1 for any diagonal matrix, and σ = 0 for any singular matrix. Since Vn = n

i=1 |ri,i| = d(L) is a constant for a given L,

we can improve σ by reducing bi2.

slide-61
SLIDE 61

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Measurement

Note that 0 ≤ σ ≤ 1, σ = 1 for any diagonal matrix, and σ = 0 for any singular matrix. Since Vn = n

i=1 |ri,i| = d(L) is a constant for a given L,

we can improve σ by reducing bi2. Possible measurements other than the geometric mean?

slide-62
SLIDE 62

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Thank you!

slide-63
SLIDE 63

Hermite Reduction LLL Reduction HKZ Reduction Minkowski Reduction A Measurement

Thank you! Questions?