Basis reduction for layered lattices
Torreão Dassen, E.
Citation
Torreão Dassen, E. (2011, December 20). Basis reduction for layered lattices.
Retrieved from https://hdl.handle.net/1887/18264
Version: Not Applicable (or Unknown)
License: Leiden University Non-exclusive license Downloaded from: https://hdl.handle.net/1887/18264
Note: To cite this publication please use the final published version (if applicable).
APPENDIX A
Two algorithms
91
92 APPENDIX A. TWO ALGORITHMS
In this short appendix we present two algorithms of our work in pseudocode.
We start with an algorithm for the Gram-Schmidt procedure which can be derived from proposition (5.7).
input : A sequence of rational matrices {B1, . . . , Bn} ∈ Mm(Q) specifying the inner-product of the layered Euclidean space (Rm,Rn, h·, ·i) with respect to the canonical basis.
output: The Gram-Schmidt basis {e∗i}mi=1 associated to the canonical basis {ei}i∈m ofQmviewed as a subspace of the layered Euclidean space and the numbers {λi,j}16j<i6m, λi,j∈Q given by equations (5.9) which specify the canonical basis in terms of its associated Gram-Schmidt basis.
1 for i = 1 to m do
2 e∗i ← ei;
3 for j = 1 to i − 1 do
/* Compute λi,j inductively. */
4 λi,j← (e∗Ti · e0j)/(e∗Tj · e0j);
/* Update e∗i. */
5 e∗i ← e∗i − λi,j· e∗j;
6 end for
/* Compute the o(i). */
7 o(i) ← n + 1;
8 repeat
9 o(i) ← o(i) − 1;
10 e0i← Bo(i)· e∗i;
11 until e∗Ti · e0i6= 0;
12 end for
Algorithm A.1: Gram-Schmidt algorithm
We now give a quick description of the layered LLL algorithm. This is a simplified version based on the algorithm of section (6.2). We chose to de- scribe the algorithm in this way for clarity. By GS({ei}mi=1, k) we mean a call to a sub-procedure computing the first k vectors of the Gram-Schmidt basis associated to the basis {ei}mi=1 and the numbers λi,j, 1 6 j < i 6 k expressing the vectors ei in terms of its associated Gram-Schmidt basis.
93
input : A rational number c > 4/3 and an ordered sequence of rational matrices {B1, . . . , Bn} ⊂ Mm(Q) specifying the inner-product of the layered Euclidean space (Rm,Rn, h·, ·i) with the property that the group generated by the canonical basis {e1, . . . , em} of Rmis a layered lattice.
output: A c-reduced basis {ei}mi=1 of the same layered lattice.
1 k ← 2;
2 {e∗i}ki=1, {λi,j}16j<i6k← GS({ei}mi=1, k);
3 for j = k − 1 to j = 1 do
4 if |λk,j| > 1/2 then
/* Size-reduce λk,j. [·] denotes the nearest integer function. */
5 λ ← [λk,j];
6 ek← ek− λ · ej;
7 {e∗i}ki=1, {λi,j}16j<i6k← GS({ei}mi=1, k); /* Update the Gram-Schmidt basis. */
8 end if
9 end for
10 if lt(q(e∗k−1)) 6 c · lt(q(e∗k)) then
/* To this point we have a c-reduced basis up to level k.
*/
11 if k < m then
12 k ← k + 1;
13 GOTO 2;
14 end if
15 EXIT;
16 else
17 e ← ek, ek ← ek−1and ek−1← e; /* Swap ek−1, ek */
18 if k > 2 then
19 k ← k − 1;
20 end if
21 GOTO 2;
22 end if
Algorithm A.2: Layered LLL algorithm