|
Algorithm 1 LLL algorithm. |
-
Input:
lattice basis , a reduction parameter .
-
Output:
a -LLL reduced basis
-
1:
Calculate the Gram–Schmidt orthogonalization .
-
2:
for i = 2, 3,…, n do
-
3:
for j = i − 1, i − 2,…, 1 do
-
4:
, where ;
-
5:
end for
-
6:
end for
-
7:
if , s.t. then
-
8:
Swap and ;
-
9:
Go to Step 1.
-
10:
end if
-
11:
return .
|