3.1. Lattice Partition with Translation
In a sense, lattice partition in the context of SVP can be considered as a tessellation centered at the origin
. For example, in Babai’s partition, the cell
with tag
exactly corresponds to the origin-symmetric parallelepiped
, and for any tag
, the closure of
and
are central symmetrical with regard to the origin. In addition, if
is close to
(
has sparse coordinates or have light “weight”), it is more likely to contain a short lattice vector. Natural partition also has analogous properties. (See Figure 1 in [
25].)
Since DP enumeration shows its advantages in lattice enumeration for solving SVP, which can be explained as a special instance of CVP with target vector , then it is a natural idea to generalize it to CVP instances with .
For a given basis , and a target vector , in the following, we write and to denote their decomposition under Gram–Schmidt basis . To minimize the distance , discrete pruning technique requires a proper definition of partition which is centered at .
Definition 7 (translated Babai’s partition)
. Given basis , target vector , Babai’s partition translated to is defined by lattice partition , where for tag , the cell Definition 8 (Translated Natural partition)
. Given and as above, the natural partition translated to is defined by lattice partition , where for tag , the cell Since and are the translation of and with offset , respectively, obviously they are tessellations of and therefore meet the first property of Definition 4. To prove the uniqueness of lattice vector contained in and , we first give the algorithms to recover from tag and give proofs of their correctness, then from the proofs we can derive the bijection property between lattice vector and tag vector.
Proposition 1. Algorithm BabaiDecode() outputs the unique such that , and therefore, the translated Babai’s partition is a -partition.
Proof. We first prove the correctness of Algorithm 4, and then prove the uniqueness of vector contained in , which also verifies that the keeps the second property of lattice partition in Definition 4 after translation.
Consider the output of
BabaiDecode(
) in the form of Equation (
3), i.e.,
, we have
, where
are calculated by line 7–8 in Algorithm 4. Then, the following holds
for all
. From the stipulation of rounding off operation
, it is easy to see
and more directly,
, which exactly satisfies the definition of cell
and we can conclude that
.
Now, we assume there are two lattice vector contained in the same cell . Let and , and assume there exists an index such that and . This means in line 8 of Algorithm 4, and are derived from the different value, denoted by and , respectively, and . This makes a contradiction since both y and are calculated by the same , , and (). □
Algorithm 4BabaiDecode() |
- Require:
Target vector , lattice basis , tag - Ensure:
lattice vector - 1:
Compute orthogonal basis and Gram–Schmidt coefficients - 2:
fortondo - 3:
- 4:
- 5:
end for - 6:
for to 1 do - 7:
- 8:
- 9:
end for - 10:
return
|
Similarly, for natural partition, we also give the decoding algorithm NaturalDecode() in the following and provide an analogous declaration and proof.
Proposition 2. Algorithm NaturalDecode() outputs the unique such that , and therefore the translated natural partition is an -partition.
Proof. Consider the output of
NaturalDecode(
) written in the form as above, according to Algorithm 5, then for all
, there holds:
where
and especially, we stipulate
.
Let , now, we consider four cases:
Case 1:
and
. In this case,
, and since
, we have
. With the third line in Equation (
9), it is easy to see
Case 2:
and
. In this case,
. Similar to case 1, we have
Case 3:
and
. In this case,
. Additionally, we have
, and therefore,
Case 4:
and
. In this case,
. Similar with case 3, we have
For all the possible cases for Equation (
9), we have proved
satisfies the Definition 8, which means
. The uniqueness of vector
can be proved by the similar method of proving Proposition 1. □
Algorithm 5NaturalDecode() |
- Require:
Target vector , lattice basis , tag - Ensure:
lattice vector - 1:
Compute orthogonal basis and Gram–Schmidt coefficients - 2:
fortondo - 3:
- 4:
- 5:
end for - 6:
forto 1 do - 7:
- 8:
- 9:
if then - 10:
- 11:
else - 12:
- 13:
end if - 14:
end for - 15:
return
|
Although a certain lattice vector
(or
) is determined by the tag
, for vectors randomly selected in the lattice, their distribution behavior still shows some pseudo-randomness, which is called randomness assumption and is commonly applied in the analysis of many SVP algorithms [
22,
23,
25]. The essence of this assumption is to treat the fractional part of GS coefficients
of lattice vector
as uniformly distributed in a certain interval, and we believe that this is also applicable to the translated cases. Here, we propose the randomness assumption for our lattice partition.
Assumption 1. Given lattice and some , let lattice vector be a random variable, then, we assume are n independent random variables and each is uniformly distributed in (resp. ), where is the tag of cell (resp. ) containing . As the first moment of each is (respectively, ), the expected values of in Babai’s partition and natural partition areand Similarly, the variances of areand We note that Assumption 1 is a generalization of the original randomness assumption (see Corollary 2 and 3 in [
25]). In other words, the original randomness assumption is a special case of Assumption 1 where
for all
.
3.2. Interpreting Nearest Plane(s) Algorithm with Lattice Partition
From the perspective of output results, we can immediately conclude that , which means that the output of NearestPlane() exactly equals to BabaiDecode() and NaturalDecode().
For
NearestPlanes algorithm, since
we can see that the output set of
NearestPlanes(
) equals with the set of vectors output by calling
NaturalDecode(
) on all tags
with
for all
.
From the perspective of calculation process, we also give an interpretation of the essential equivalence between Nearest Plane(s) algorithms and lattice partition in depth. In NearestPlane() (Algorithm 1), for , we can easily verify that . For iteration indexes , we assume , and in line 5 of Algorithm 1, we have . Then, in the next loop, we actually compute , which is equivalent to line 3 of Algorithm 5 with .
As for NearestPlanes() (Algorithm 2), the combination coefficients of output vector form a recursion tree with depth n, and each parent node with path in the -th layer leads to child nodes (line 4), where is the -th closest integer to , which is also calculated in line 7 of Algorithm 5. Now, we explain how the “-th closest integer to ” is calculated. Consider the quadratic function of variable x, the integral value of x closest to is . If the rounding off goes to direction, i.e., , then the next integral value of x closest to takes the direction and . Then, the second integer goes in the same direction with rounding off and , and so on. It can be easily deduceed that which is what NaturalDecode (Algorithm 5) actually does. Therefore, for each leaf node correspond to coefficients reached by NearestPlanes algorithm, it is equivalent to NaturalDecode with input tag .
The work of AN17 [
25] gave experimental evidence to show that the natural partition is expected to contain a short vector with higher probability than Babai’s partition. In this section, we also exhibit that natural partition has more explainability by using it to interpret the nearest plane(s) algorithms.
3.3. DP Enumeration for BDD
Babai’s Nearest plane algorithm or nearest planes algorithm is actually a single round of lattice decoding on a certain (but not the optimal) set of cells. Inspired by discrete pruned enumeration for SVP, here, we propose the DP enumeration based on the translated lattice partition to solve BDD problem. This algorithm includes nearest plane(s) algorithms as special cases, while it is expected to achieve an optimal performance when solving BDD.
To migrate DP enumeration from SVP to BDD, a peculiar case one has to consider in addition is that, in some cryptanalysis scenarios, the information an adversary can acquire is insufficient to construct a “gap” in the lattice and therefore the lattice vector found by BDD algorithm might not be the “unique” vector close to a target vector
. For example, solving LWE with few samples [
32], and the lattice attack of ECDSA with very few leaked nonce bits [
12,
14]. Assume that the BDD instance has a right solution
such that
, and then by searching in an
n-dimensional ball centered at
with radius
R, the enumeration algorithm might find more than one lattice vectors
such that all
. In such a case, each of them should be checked to see which is the right solution corresponding to the secret of the cryptosystem. This oracle related to a certain cryptographic algorithm is also a “BDD predicate” by Albrecht and Heninger [
14], and we will call it a BDD oracle
Orc to be consistent with the definition of generalized BDD.
Algorithm 6 gives the framework of DP enumeration with natural partition
. We note that in a standard BDD instance, i.e.,
, the lattice vector satisfying
is unique and we can omit the BDD oracle
Orc. To solve the BDD instance derived from different cryptosystems, the
Pred is also different and we will give their detail in
Section 5.
Algorithm 6DPenum4BDD |
- Require:
BDD target vector , lattice basis , expected length of BDD error length R, BDD oracle Orc, number of tags M, BKZ parameter - Ensure:
such that - 1:
Run BKZ reduction on with blocksize - 2:
while true do - 3:
- 4:
BinSearch() Find r such that there are M tags satisfying - 5:
CellEnum() Enumerate these M tags and save them in set S - 6:
for do - 7:
NaturalDecode() - 8:
if and Orc then - 9:
return Find the solution - 10:
end if - 11:
end for - 12:
Reprocess() generate a different reduced basis and repeat the enumeration - 13:
end while
|
This framework is inherited from the improved version of DP enumeration [
26], and some details should be explained in depth in order to make our algorithm adapt to the BDD problem.
Binary search and cell enumeration.
The goal of line 4 and 5 of Algorithm 6 is to generate a batch of cells
which are “most likely” to contain a lattice vector very close to
. The optimality of such a set is generally indicated by the expected distance
. However, the original definition of
cannot guarantee the polynomial time complexity of
CellEnum and the indicator
should be slightly modified. The pivotal modification is removing the constant part of each item
, and the indicator becomes
Since the bound
r for cell enumeration is hard to determine, one should specify the size of set
S, and then
r can be computed by a binary search method by calling
CellEnum (Algorithm 7) as a subalgorithm.
Algorithm 7CellEnum |
- Require:
, r - Ensure:
- 1:
Compute orthogonal basis from - 2:
- 3:
- 4:
- 5:
- 6:
while true do - 7:
Equation ( 10) - 8:
if then - 9:
if then - 10:
- 11:
; - 12:
else - 13:
- 14:
- 15:
end if - 16:
else - 17:
- 18:
if then - 19:
exit - 20:
else - 21:
- 22:
end if - 23:
end if - 24:
end while - 25:
return S
|
Algorithm 8 gives a polynomial-time binary search method to calculate the cell enumeration radius
r. If
is small, say
or smaller, the number of tags satisfying
can be approximately counted as
M. Note that in line 5,
CellEnum can be terminated instantly as long as it outputs more than
tags.
Algorithm 8BinSearch |
- Require:
- Ensure:
such that - 1:
- 2:
- 3:
whiledo - 4:
- 5:
if CellEnum() returns more than tags then - 6:
is too large - 7:
else if CellEnum() returns less than tags then - 8:
is too small - 9:
else - 10:
return is acceptable - 11:
end if - 12:
end while
|
According to [
26], the time complexity of
CellEnum is proved to be
, and
BinSearch calls
CellEnum for
times.
Lattice basis reprocessing.
When solving BDD, a single round of DP enumeration might not find the solution, since its searching space does not cover the whole
. A standard way is to re-randomize the lattice basis and repeat the procedures on the new basis. To improve the efficiency and for the convenience of concrete time analysis, Luan et al. [
26] proposed a set of comprehensive strategies along with the preprocessing of DP enumeration, which can be instantiated as
Reprocess (Algorithm 9).
At the very beginning of
DPenum4BDD, the lattice basis is BKZ
-reduced, and in the following loops,
Reprocess heuristically guarantees that the properties of output basis are as good as those of a fully BKZ
-reduced basis at a very small and controllable cost, while the latter usually has rather long and unpredictable running time.
Algorithm 9Reprocess |
- Require:
- Ensure:
- 1:
is identity matrix - 2:
Randomly select n position with and let - 3:
- 4:
Run k-tours of BKZ reduction on Usually - 5:
return
|