Skip to main content
Entropy logoLink to Entropy
. 2026 May 27;28(6):600. doi: 10.3390/e28060600

On (n,k)-Simple Random Integer Lattices

Gengran Hu 1,2
Editor: Lu Wei
PMCID: PMC13298366  PMID: 42352110

Abstract

Random integer lattices are fundamental to lattice-based cryptography and algorithmic number theory. A new random integer lattice model, free of any restrictions on the Hermite Normal Form (HNF), was introduced by in 2016. It was also observed that the probability of such a lattice being in a simple HNF form is approximately 44%. In this paper, the gap between general random integer lattices and those in a simple HNF is bridged by introducing the concept of the (n,k)-simple random integer lattice, where the first k diagonal entries of the HNF are fixed to 1. We derive the asymptotic counting formula for such lattices and compute their density among all integer lattices. Furthermore, a generation algorithm for the (n,k)-simple random integer lattice based on rejection sampling and inverse sampling methods are proposed, with the analysis showing that it achieves O(n2) expected running time. This work provides a theoretical foundation and practical toolkit for constructing structured random lattices with controlled HNF forms.

Keywords: (n,k)-simple; HNF; random integer lattice; rejection sampling method

1. Introduction

The study of random integer lattices is significant in computational number theory and cryptography, particularly in the analysis of lattice-based cryptographic primitives such as NTRU [1], LWE [2], and their variants [3,4]. A challenge in this area lies in understanding the distribution of lattice bases and their associated Hermite Normal Form (HNF), which offers a unique normal form for integer lattices [5]. HNF has been studied to some extent in algorithmic number theory. Early work by Kannan and Bachem [6] established polynomial-time algorithms for HNF computation, while subsequent research by Micciancio and Warinschi [7] explored its applications in cryptography. The probabilistic properties of HNF have attracted considerable attention, with studies on the distribution of diagonal entries and their statistical behavior [8].

The problem of generating random lattices has been studied from multiple perspectives. Goldstein and Mayer [9] studied the distribution of lattice determinants and related arithmetic functions, laying the foundation for probabilistic models of lattices. Concerning HNF of integer matrices, Maze [10] explored their natural density distribution. Then the enumeration of integer lattices with a bounded determinant was systematically studied by Hu et al. [11] and later refined in [12] on the generation algorithm, providing the theoretical basis for random lattice models. Especially in [11], the analysis revealed that a significant proportion—approximately 44% of such random lattices—already exhibit a simple HNF structure, where the diagonal entries are all 1 but the last one. However, this observation raises a natural question: what is the precise probability that an HNF has its first k diagonal entries equal to 1, and how can such structured lattices be generated efficiently?

When cryptographic applications are considered, the generation of random lattices with specific properties has become increasingly important. The NTRU cryptosystem [1] relies on lattices with special algebraic structures, while LWE-based schemes [2] often require random lattices with controlled parameters. Later works on efficient lattice trapdoors [13], Ring-LWE toolkit [14], FHE based on LWE and NTRU [15], and lattice-based obfuscation [16] have further emphasized the need for efficient and flexible lattice generation methods. Meanwhile, to assess the security of lattice-based cryptosystems, algorithms like LLL [17] and BKZ [18,19] are commonly employed. Since both cryptographic constructions and the corresponding lattice reduction algorithms operate on integer lattices, which are discrete subgroups of Zn, the question of how to properly define and randomly generate such lattices is of great importance. Once a method for generating random integer lattices is constructed, it can be employed to supply random inputs to lattice algorithms, thereby allowing their average performance characteristics to be evaluated.

In this paper, we formalize the notion of (n,k)-simple HNF, defined as an n×n HNF whose first k diagonal entries are 1. This definition fills the gap between the general random integer lattice model and the special case of simple HNF considered in [11]. We study the asymptotic enumeration of such lattices and derive closed-form expressions for their density among all integer lattices. Our results generalize the earlier findings and provide a unified framework for analyzing HNF-restricted random lattices. For example, the well-known NTRU lattice, derived from the public key polynomial h(x) in NTRU cryptosystem, has the basis matrix of the form BNTRU=INH0qIN, where IN denotes the N×N identity matrix, q is the modulus, and H is an N×N circulant matrix generated by the degree-N polynomial h(x) with small integer coefficients. The security of NTRU cryptosystem lies in the hardness of finding the private key, which is some short vector in the lattice L(BNTRU). To be more specific, we consider a concrete tiny instance of NTRU. Let N=4 and the modulus q=17; suppose that the circulant matrix H is given by

H=1101111001111011,

where H corresponds to the ideal generated by the polynomial 1+x+x3 (matching the first row (1,1,0,1) of the matrix) in the ring Z[x]/(xN−1); then the corresponding NTRU lattice basis matrix BNTRU is an 8×8 matrix constructed as

BNTRU=10001101010011100010011100011011000017000000001700000000170000000017.

Since BNTRU is already in upper triangular form with positive diagonal entries, and the upper triangular entries satisfy (BNTRU)ij∈[0,(BNTRU)jj] for i<j, while the first k=N=4 diagonal entries are 1, this specific basis represents an exact (8,4)-simple HNF and the corresponding integer lattice. This framework can be used to rigorously evaluate the average-case performance of lattice reduction algorithms on this structured family by generating uniformly random instances within the controlled (n,k)-simple HNF space, rather than relying on completely unstructured random integer lattices.

The key advances of this work can be summarized in the following.

  1. The concept of an (n,k)-simple random integer lattice is introduced and its asymptotic counting formula is established.

  2. The density of such lattices among all integer lattices is derived, expressed in terms of the Riemann zeta function.

  3. An efficient generation algorithm combining rejection sampling and continuous inverse sampling is proposed, with a rigorous analysis of its time complexity.

This paper proceeds as follows. Section 2 recalls the basic notions of lattices and HNF. Section 3 gives the asymptotic counting formula for (n,k)-simple random integer lattices. Section 4 computes the density of such lattices. Section 5 details a generation algorithm along with its complexity. Section 6 closes with concluding remarks.

2. Preliminaries

Lattice and HNF

Let B∈Rm×n with m≤n and rank(B)=m, the lattice spanned by the basis B is

L(B)={∑i=1mxibi|xi∈Z},

with bi the i-th row of B. The lattice has rank m. When m=n, the lattice is called full-rank, and the lattice determinant is defined as det(L(B))=|det(B)|. In the rest of this paper, all lattices are assumed to be full-rank.

A unimodular matrix U∈GL(n,Z) satisfies B=UB′ if and only if the two bases B and B′ span the same lattice. Cryptographic schemes usually consider integer lattices, meaning their basis matrices have entries in Z rather than R. Hence, the space of all full-rank integer lattices is the quotient GL(n,R)∩Zn×n/GL(n,Z).

HNF is a special type of integer matrix used in number theory, whose definition is as follows.

Definition 1 

(HNF). An n×n integer matrix is called an n×n HNF when it meets the following criteria:

  • Upper triangular: hij=0 for all indices with i>j;

  • Positive diagonal: hii>0 for each i;

  • Modular reduction: For any off-diagonal entry above the diagonal, it requires that hij∈[0,hjj) for all i<j.

Now we define a family of special form of HNF, called (n,k)-simple HNF, which is described below.

Definition 2 

((n,k)-simple HNF). An n×n integer matrix H is called an (n,k)-simple HNF if it meets the following criteria:

  • H is an n×n HNF;

  • The first k diagonal entries of H, or h11,h22,⋯,hkk are 1.

If a random HNF is chosen, most of its diagonal entries will be 1 [11]; therefore, it is necessary to consider the special form of HNF with several 1s on the diagonal.

3. The (n,k)-Simple Random Integer Lattice

It is a classical result that every full-rank integer lattice possesses a unique HNF as its basis [20], and by [11], the random integer lattice is defined by an HNF chosen uniformly from the set Hn≤(M), where M∈Z+ is large enough, and

Hn≤(M)≜{H|Hisann×nHNFwithdeterminant≤M}.

Here we generalize this definition to the set of (n,k)-simple form of the HNF, which is stated as

Hn,k≤(M)≜{H|Hisan(n,k)-simpleHNFwithdeterminant≤M}.

From [11], we already knew the asymptotic formula for |Hn≤(M)|, which is

|Hn≤(M)|=∏j=2nζ(j)nMn+O(Mn−1logM), (1)

now we intend to obtain the asymptotic formula for Hn,k≤(M) on k=1,⋯,n−1. First, we need a lemma in [11] that counts the summation of certain power series, which is given below.

Lemma 1 

(From [11], Lemma 1). For a given integer n≥4 and sufficiently large M∈Z+, let (ti)i=1n be a non-decreasing sequence of non-negative integers satisfying tn−3≤tn−2<tn−1≤tn. If the multiple sum is defined as

S(M,t1,⋯,tn)≜∑ai∈Z+,∏i=1nai≤Ma1t1⋯antn,

where ζ(s) is the Riemann zeta function, then the asymptotic expansion of S(M,t1,⋯,tn) is given as

S(M,t1,⋯,tn)=∏j=1n−1ζ(sn+1−sj)sn+1Msn+1+O(MsnlogM),tn−1<tn∏j=1n−1ζ(sn+1−sj)sn+1Msn+1logM+O(Msn+1),tn−1=tn.

Using Lemma 1, we can obtain the counting result on |Hn,k≤(M)|, which is shown in Theorem 1.

Theorem 1.

For integer n≥4 and sufficiently large M∈Z+, the value of |Hn,k≤(M)| can be estimated asymptotically by

|Hn,k≤(M)|=∏j=2n−kζ(j)nMn+O(Mn−1logM). (2)

Proof. 

By definition, any H∈Hn,k≤(M) should satisfy that H is (n,k)-simple and det(H) is bounded by M. Since the (n,k)-simple property means that the first k diagonal entries of H are exactly 1, we know that |Hn,k≤(M)| is determined exclusively by ak+1,⋯,an, which is represented by the following formula as

∑ai∈Z+,∏i=k+1nai≤M10⋯1k−1ak+1kak+2k+1⋯ann−1.

By Lemma 1, we obtain

|Hn,k≤(M)|=∑ai∈Z+,∏i=k+1nai≤Mak+1kak+2k+1⋯ann−1=S(M,k,k+1,⋯,n−1)=∏j=1n−k−1ζ(n−(k−1+j))nMn+O(Mn−1logM)=∏j=2n−kζ(j)nMn+O(Mn−1logM).

The proof is hereby completed.    □

Now we give the definition of (n,k)-simple random integer lattice as follows.

Definition 3 

((n,k)-simple random integer lattice). For integer n≥4, and the determinant upper bound M∈Z+, if H is selected uniformly from Hn,k≤(M), then L(H) is called an (n,k)-simple random integer lattice.

Remark 1.

It should be pointed out that when k=0, the (n,0)-simple random integer lattice is exactly the random integer lattice defined in [11].

4. The Density of (n,k)-Simple Integer Lattice

After defining the (n,k)-simple random integer lattice, the following theorem gives the density of the (n,k)-simple integer lattice in all of the integer lattices.

Theorem 2.

For integer n∈[4,+∞), and a large enough M∈Z+, when M→+∞, let H be uniformly chosen from Hn≤(M); then the probability of H being (n,k)-simple is 1/∏j=n−k+1nζ(j) for k=1,2,⋯,n−1.

Proof. 

Combing the results from Equations (1) and (2), we obtain the following

Prob(His(n,k)-simple)=|Hn,k≤(M)||Hn≤(M)|=∏j=2n−kζ(j)nMn+O(Mn−1logM)∏j=2nζ(j)nMn+O(Mn−1logM)=1/∏j=n−k+1nζ(j)+O(logM/M)1+O(logM/M)=1/∏j=n−k+1nζ(j)+O(logM/M),

implying that when M tends to infinity, the probability of H being (n,k)-simple is 1/∏j=n−k+1nζ(j), which completes the proof.    □

More clearly, the approximate numerical result on the density of (n,k)-simple integer lattices from Theorem 2 is shown in Table 1, where n is set to 2s for s∈[3,8], and k is set to 1,n4,n2,3n4 and n−1.

Table 1.

The approximate density of (n,k)-simple integer lattices among all integer lattices (rounded to five decimal places).

n k=1 k=n4 k=n2 k=3n4 k=n−1
8 0.99609 0.99216 0.96145 0.76258 0.43574
16 0.99998 0.99976 0.99798 0.96074 0.43576
32 1.00000 0.99999 0.99999 0.99798 0.43576
64 1.00000 1.00000 1.00000 0.99998 0.43576
128 1.00000 1.00000 1.00000 1.00000 0.43576
256 1.00000 1.00000 1.00000 1.00000 0.43576

Based on the data presented in Table 1, for a fixed lattice rank n, the density decreases monotonically as k increases, since imposing more diagonal entries equal to 1 introduces stricter structural constraints, thus reducing the number of admissible lattices. In more detail, when k is relatively small compared to n, the density rapidly approaches 1 as n increases. For instance, at k=n/2, the density rises from approximately 0.96145 for n=8 to almost 1.00000 for n=64,128,256. This indicates that a random integer lattice with high rank almost surely satisfies the condition that the first k diagonal entries of its HNF are equal to 1. Moreover, when k=n−1, the density stabilizes at approximately 0.43576 and exhibits nearly no dependence on n. This limiting value coincides with the theoretical constant ∏j=2+∞ζ(j).

5. The Generation Algorithm of (n,k)-Simple Random Integer Lattice

Since in [12], the authors proposed an algorithm aimed at generating a random integer lattice, in this part, we generalize this algorithm to the (n,k)-simple random integer lattice for k∈[1,n−1].

5.1. Rejection Sampling and Inverse Sampling

To illustrate this algorithm clearly, we first need two fundamental techniques from probability theory: rejection sampling and continuous inverse sampling. When dealing with a distribution D that is defined on a set A, these methods can produce a random variable that adheres precisely to D. The following two theorems outline these two standard sampling methods respectively. For rigorous proofs and detailed theoretical foundations, we refer the reader to [21] and [22], respectively.

Theorem 3 

(Rejection Sampling, from [21]). Suppose D is a distribution defined on a set A with its density function f(x), D′ is another distribution with proposal density function g(x). Let C be a constant s.t. f(x)≤Cg(x) for all x. Then iteratively do the following: Sample x∼D′ and u∼U[0,1]; if u>f(x)Cg(x), reject and repeatedly sample x and u; otherwise accept and output x. Finally, the output x then follows the target distribution D.

Theorem 4 

(Inverse Sampling, from [22]). Let D be a distribution defined over a set A with a cumulative distribution function F. Sample y∼U[0,1] and compute x satisfying F(x)=y. Then the random variable x follows the target distribution D.

5.2. Generating the (n,k)-Simple Random Integer Lattice

As discussed in Section 2 and Section 3, an integer lattice has a unique HNF. Since an (n,k)-simple random integer lattice has the first k diagonal entries a1=⋯=ak=1, its leading k×k principal submatrix has already been determined to be Ik. The remaining generation process consists of three stages. First, the diagonal entries ak+1,ak+2,⋯,an−1 are generated. Second, the final diagonal entry ann is generated. Third, all off-diagonal entries are chosen. The resulting matrix H is then output as the basis matrix for the (n,k)-simple random integer lattice.

5.2.1. Generating the Diagonal Entries hk+1,k+1,⋯,hn−1,n−1

In this part, to generate the diagonal entries hk+1,k+1,⋯,hn−1,n−1, the distribution of these variables should be obtained. The joint distribution of ak+1,⋯,an−1 is described below.

Theorem 5.

Given the lattice rank n≥4 and the upper bound of the lattice determinant M∈Z+, if H=(hij) is an (n,k)-simple random integer lattice with k∈[1,n−1], then for b1,⋯,bn−k−1∈Z+, when M→+∞, for i∈[1,n−k−1], it can be obtained that

Prob(hk+i,k+i=biforalli)=∏i=1n−k−1bi−(n+1−i)∏j=2n−kζ(j).
Proof. 

Since the diagonal entries ak+1,⋯,an−1 have been set to b1,⋯,bn−k−1 respectively, the only free variable to do summation is the last diagonal entry ann. From Lemma 1, we know that

Prob(hk+1,k+1=b1,⋯,hn−1,n−1=bn−k−1)=limM→+∞(∑a1≤M/(b1⋯bn−k−1)a1n−1)∏i=1n−k−1bik+i−1|Hn,k≤(M)|=limM→+∞(1n(Mb1⋯bn−k−1)n+O((Mb1⋯bn−k−1)n−1logMb1⋯bn−k−1))∏i=1n−k−1bik+i−1∏j=2n−kζ(j)nMn+O(Mn−1logM)=∏i=1n−k−1bi−(n+1−k−i)∏j=2n−kζ(j),

which completes the proof.    □

Moreover, the distribution of each value of ak+1,⋯,an−1 is stated below.

Theorem 6.

Consider an integer lattice of rank n≥4 with a prescribed upper bound M∈Z+ on its determinant. If H=(hij) is an (n,k)-simple random integer lattice with k∈[1,n−1], then for b1,⋯,bn−k−1∈Z+, when M→+∞, for each i∈[1,n−k−1], it can be derived that

Prob(hk+i,k+i=bi)=bi−(n+1−k−i)ζ(n+1−k−i).
Proof. 

Since only one diagonal entry ak+i has been determined, the summation is for the remaining variables. By Lemma 1, we have

Prob(hk+i,k+i=bi)=limM→+∞(∑a1⋯an−k−1≤Mbia1k⋯ai−1k+i−2aik+i⋯an−k−1n−1)bik+i−1|Hn,k≤(M)|=limM→+∞S(Mbi,k,⋯,k+i−2,k+i,⋯,n−1)bik+i−1|Hn,k≤(M)|=limM→+∞(∏j=2,j≠n−k−i+1n−kζ(j)n(Mbi)n+O((Mbi)n−1logMbi))bik+i−1∏j=2n−kζ(j)nMn+O(Mn−1logM)=bi−(n+1−k−i)ζ(n+1−k−i).

The proof is concluded.    □

Remark 2.

Combining the above two theorems, we know that for sufficiently large M∈Z+, the joint distribution of hk+1,k+1,⋯,hn−1,n−1 is exactly the product of the distribution of each variable, which implies that these values can be viewed as independent variables.

Since the distributions of hk+1,k+1,⋯,hn−1,n−1 have been computed, the rejection sampling method can be utilized to generate them sequentially.

From Theorem 6, consider the distribution of hk+i,k+i, if D(s) is defined as

D(s):Prob(X=x)=1ζ(s)x−s(x=1,2,⋯), (3)

then the distribution of hk+i,k+i is actually D(n+1−k−i).

To generate random variates following the distribution D(s), we employ the rejection sampling method. Since the target distribution D(s) has the density function f(x) as in Equation (3), we choose the proposal distribution D′ over Z+ with density

g(x)=1x(x+1),(x=1,2,⋯).

It could be verified that sampling from D′ can be achieved by the simple transformation x=⌊1/v⌋, with v∼U[0,1]. Indeed, for any x∈Z+, we have

Prob(⌊1/v⌋=x)=Prob(1x+1<v≤1x)=1x−1x+1=g(x).

Moreover, the maximum of f(x)g(x)=x−s/ζ(s)1/(x(x+1))=x1−s(x+1)ζ(s) is 2/ζ(s) attained at x=1, which implies the constant C can be set to 2/ζ(s). Thus the procedure of generating hk+i,k+i can be designed as follows.

  1. Choose v∼U[0,1] and compute x=⌊1/v⌋;

  2. Set s=n+1−k−i, compute f(x)=x−s/ζ(s) and g(x)=1/x(x+1);

  3. Choose v∼U[0,1]; when u>(ζ(s)f(x))/(2g(x)), reject and repeat from step 1; otherwise, accept and set hk+i,k+i=x.

5.2.2. Generating the Last Diagonal Entry hnn

The case of generating the last diagonal entry hnn is different. Let d be the product of all diagonal entries except the last. Using the technique in [12], we can similarly obtain Theorem 7.

Theorem 7.

For rank n≥4 and sufficiently large determinant upper bound M∈Z+, given an (n,k)-random integer lattice with its HNF is H=(hij) and d≜∏i=1n−1hii, we have

Prob(d≥1/(logM)2)≤1/logM.
Sketch of the Proof. 

The proof consists of two main parts: deriving the mathematical expectation of d using the HNF counting lemma, and then applying Markov’s inequality to establish the probability upper bound.

For the first part, the expected value of the product of the first n−1 diagonal elements is formulated as

E(d)=∑≤Mt·Prob(d=t)=∑t≤Mt·|Hn−1,k(t)|·∑an≤M/tann−1|Hn,k≤(M)|,

where |Hn−1,k(t)| represents the number of (n−1)-dimensional HNFs with determinant t, and |Hn,k≤(M)| is the total number of (n,k)-simple HNFs with determinants upper bounded by M.

Expanding the numerator by using the HNF counting formula yields a multi-variable summation. This allows us to map both the numerator and the denominator directly to the asymptotic sums defined in Lemma 1 as

E(d)=S(M,k+1,k+2,…,n−1,n−1)S(M,k,k+1,…,n−2,n−1)

According to the asymptotic formulas provided in Lemma 1, we have

S(M,k+1,k+2,…,n−1,n−1)=∏j=2n−k−1ζ(j)nMnlogM+O(Mn),S(M,k,k+1,…,n−2,n−1)=∏j=2n−kζ(j)nMn+O(Mn−1logM).

Dividing the above expressions yields

E(d)=∏j=2n−k−1ζ(j)nMnlogM+O(Mn)∏j=2n−kζ(j)nMn+O(Mn−1logM)=logM+O(1)ζ(n−k)+OlogMM=1ζ(n−k)logM+O(1).

This completes the first part of the proof.

For the second part, since d=∏i=1n−1hii is a product of positive diagonal entries, it is strictly a non-negative random variable. Markov’s inequality can be applied here, which states that for any non-negative random variable X and a constant a>0, it holds that

Prob(X≥a)≤E(X)a.

By setting the random variable d and assigning the threshold parameter a=(logM)2, we obtain the following tail probability bound as

Prob(d≥(logM)2)≤E(d)(logM)2=1ζ(n−k)logM+O(1)(logM)2≤1logM,

which completes the second part of the proof.    □

Theorem 7 shows that ∏i=1n−1hii is typically much smaller than M, which implies that ⌊M/d⌋ is still sufficiently large. Since the value range for hnn is large, we can use the inverse sampling method to obtain hnn by providing a reasonable characterization of the distribution of hnn. Consequently, for an (n,k)-simple random integer lattice basis H=(hij), the distribution of hnn can be represented as

D˜(n,M0):Prob(X=x)=1∑t=1M0tn−1xn−1(x=1,2,⋯,M0), (4)

which is actually a truncated discrete power-law distribution. Thus the distribution of hnn in an (n,k)-simple random integer lattice is actually D˜(n,⌊M/d⌋) where d=∏i=1nhii. After computing its cumulative distribution function F(x), we know that the following is a reasonable estimation of F(x) by considering the main terms as

F(x)≜Prob(X≤x)≈xn/nM0n/n=(xM0)n.

Since the function (x⌊M/d⌋)n can be easily inverted, we can design the process of generating hnn as follows by the inverse sampling method.

  1. Choose y∼U[0,1];

  2. Compute x s.t. (x⌊M/d⌋)n=y, and set hnn=⌊x⌉.

Since the first k diagonal entries of (n,k)-simple HNF are 1, and the generation of the off-diagonal entries is easy, we can now propose the main generation algorithm for the (n,k)-simple random integer lattice.

5.3. Detailed Algorithm Description

After the discussion in Section 5.2, the detailed generation algorithm of (n,k)-simple random integer lattice is listed as Algorithm 1.

Algorithm 1 Construction of an (n,k)-simple random integer lattice
Require: lattice rank n, lattice determinant bound M, and k∈[1,n−1]
Ensure: An (n,k)-simple random integer lattice L with det(L)≤M
    Phase 1: Diagonal entries h11,…,hn−1,n−1
    h11=⋯=hkk=1
    d←1
    for i=1 to n−k−1 do
        repeat
            Sample v∼U[0,1] and set x←⌊1/v⌋
            Compute acceptance probability r←x1−s(x+1) with s=n+1−k−i
            Draw u∼U[0,1]
        until u≤r
        d←d·x
        hk+i,k+i←x
    end for
    Phase 2: Final diagonal hnn
    Sample y∼U[0,1]
    hnn←M/d·y1/n
    Phase 3: Off-diagonal entries
    for  j=1 to  n  do
        for i=1 to j−1 do
            hij∼U{0,1,…,hjj−1}
        end for
        for i=j+1 to n do
            hij←0
        end for
    end for
    Phase 4: Output
    Construct H=(hij), return L(H)

5.4. Running Time Analysis of Algorithm 1

When analyzing the time complexity, notice that the time spent in Phase 2 and Phase 3 is obviously O(1) and O(n2), respectively. Thus, the remaining task is to assess the repetition times in the repeat loop of Phase 1. In fact, the following theorem states the result.

Theorem 8.

For lattice rank n and the parameter k∈[1,n−1], in each repeat loop of Algorithm 1, the expected number of iterations is bounded by 2.

Proof. 

Since within the repeat loop, the rejection sampling method is used, for s=n+1−k−i, we obtain that

E(numberofiterations)=1/E(Prob(accept))=1/∑x≥1g(x)·f(x)Cg(x)=C·∑x≥1f(x)=C=2ζ(s)≤2,

which completes the proof. □

By Theorem 8, since the expected number of iterations does not exceed 2, the expected total number of iterations within Phase 1 is bounded by 2(n−k−1), which is O(n). Thus, we have the following assessment of the time complexity of this algorithm.

Theorem 9.

For lattice rank n and the parameter k∈[1,n−1], Algorithm 1 runs in O(n2) expected time on average.

6. Conclusions

In this work, the special (n,k)-simple HNF is first discussed; then the corresponding (n,k)-simple random integer lattice is defined and studied. Moreover, the probability result of the diagonal entries is utilized to construct the generation algorithm of (n,k)-simple random integer lattices. Finally, it is estimated that the generation algorithm takes O(n2) time on average. However, an open problem to study in the future is the investigation of the distribution and density of random integer lattices whose HNF diagonal entries are restricted to specific prime powers, or whose off-diagonal entries satisfy certain linear congruence constraints. Exploring these structured variations would provide deeper insights into the random models required for Module-LWE and Ring-LWE variants in lattice-based cryptography.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were created.

Conflicts of Interest

The author declares no conflicts of interest.

Funding Statement

This research was funded by the national natural science foundation of China under grant number 61602143.

Footnotes

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

References

  • 1.Hoffstein J., Pipher J., Silverman J.H. Proceedings of the International Algorithmic Number Theory Symposium. Springer; Berlin/Heidelberg, Germany: 1998. NTRU: A ring-based public key cryptosystem; pp. 267–288. [Google Scholar]
  • 2.Regev O. On lattices, learning with errors, random linear codes, and cryptography. J. ACM. 2009;56:1–40. doi: 10.1145/1568318.1568324. [DOI] [Google Scholar]
  • 3.Peikert C. A decade of lattice cryptography. Found. Trends Theor. Comput. Sci. 2016;10:283–424. doi: 10.1561/0400000074. [DOI] [Google Scholar]
  • 4.Lyubashevsky V., Peikert C., Regev O. Proceedings of the Annual International Conference on the Theory and Applications of Cryptographic Techniques. Springer; Berlin/Heidelberg, Germany: 2010. On ideal lattices and learning with errors over rings; pp. 1–23. [Google Scholar]
  • 5.Joux A. Algorithmic Cryptanalysis. Chapman and Hall/CRC; Boca Raton, FL, USA: 2009. [Google Scholar]
  • 6.Kannan R., Bachem A. Polynomial algorithms for computing the Smith and Hermite normal forms of an integer matrix. SIAM J. Comput. 1979;8:499–507. doi: 10.1137/0208040. [DOI] [Google Scholar]
  • 7.Micciancio D., Warinschi B. A linear space algorithm for computing the Hermite normal form; Proceedings of the 2001 International Symposium on Symbolic and Algebraic Computation; London, ON, Canada. 18–21 July 2001; pp. 231–236. [Google Scholar]
  • 8.Odlyzko A.M. Asymptotic enumeration methods. Handb. Comb. 1995;2:1229. [Google Scholar]
  • 9.Goldstein D., Mayer A. On the equidistribution of Hecke points. Forum Math. 2003;15:165. doi: 10.1515/form.2003.009. [DOI] [Google Scholar]
  • 10.Maze G. Natural density distribution of Hermite normal forms of integer matrices. J. Number Theory. 2011;131:2398–2408. doi: 10.1016/j.jnt.2011.06.010. [DOI] [Google Scholar]
  • 11.Hu G., Pan Y., Liu R., Chen Y. On random nonsingular Hermite Normal Form. J. Number Theory. 2016;164:66–86. doi: 10.1016/j.jnt.2015.12.004. [DOI] [Google Scholar]
  • 12.Hu G., You L., Li L., Hu L., Wang H. Random Integer Lattice Generation via the Hermite Normal Form. Entropy. 2021;23:1509. doi: 10.3390/e23111509. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Micciancio D., Peikert C. Proceedings of the Annual International Conference on the Theory and Applications of Cryptographic Techniques. Springer; Berlin/Heidelberg, Germany: 2012. Trapdoors for lattices: Simpler, tighter, faster, smaller; pp. 700–718. [Google Scholar]
  • 14.Lyubashevsky V., Peikert C., Regev O. Proceedings of the Annual International Conference on the Theory and Applications of Cryptographic Techniques. Springer; Berlin/Heidelberg, Germany: 2013. A toolkit for ring-LWE cryptography; pp. 35–54. [Google Scholar]
  • 15.Bonte C., Iliashenko I., Park J., Pereira H.V., Smart N.P. Proceedings of the International Conference on the Theory and Application of Cryptology and Information Security. Springer; Berlin/Heidelberg, Germany: 2022. FINAL: Faster FHE instantiated with NTRU and LWE; pp. 188–215. [Google Scholar]
  • 16.Cini V., Lai R.W., Woo I.K. Proceedings of the Annual International Cryptology Conference. Springer; Berlin/Heidelberg, Germany: 2025. Lattice-based obfuscation from NTRU and Equivocal LWE; pp. 39–72. [Google Scholar]
  • 17.Lenstra A., Lenstra H., Jr., Lovász L. Factoring Polynomials with Rational Coefficients. Math. Ann. 1982;261:515–534. doi: 10.1007/BF01457454. [DOI] [Google Scholar]
  • 18.Schnorr C.P., Euchner M. Lattice basis reduction: Improved practical algorithms and solving subset sum problems. Math. Program. 1994;66:181–199. doi: 10.1007/BF01581144. [DOI] [Google Scholar]
  • 19.Chen Y., Nguyen P.Q. Proceedings of the International Conference on the Theory and Application of Cryptology and Information Security. Springer; Berlin/Heidelberg, Germany: 2011. BKZ 2.0: Better lattice security estimates; pp. 1–20. [Google Scholar]
  • 20.Cohen H. A Course in Computational Algebraic Number Theory. Springer Science & Business Media; Berlin/Heidelberg, Germany: 2013. [Google Scholar]
  • 21.Forsythe G.E. Von Neumann’s comparison method for random sampling from the normal and other distributions. Math. Comput. 1972;26:817–826. doi: 10.1090/s0025-5718-1972-0315863-9. [DOI] [Google Scholar]
  • 22.Devroye L. Nonuniform random variate generation. Handb. Oper. Res. Manag. Sci. 2006;13:83–121. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

No new data were created.


Articles from Entropy are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES