Manuscript Offprint
arXiv:2610.38535On the Complexity of Computing with p-adic Lattices
Abstract
We study the complexity of two fundamental problems attached to -adic lattices: computing an -orthogonal basis, and deciding whether a given basis is -orthogonal. When the norm is supplied through an explicit diagonal representation, both problems are polynomial. However, in the black-box model, where the ultrametric norm is fixed and only accessible through an evaluation oracle, we prove that both problems require queries in the worst case, where is the largest multiplicity of a commensurability class of and is the dimension of the ambient vector space. We then analyse the optimality of these bounds by providing explicit algorithms.
Our results answer formally an open question of Zhang, Deng and Wang [13] and refine the recent results of Duan and Wu [4] by providing pointwise query bounds depending on the norm's structure, in addition to uniform bounds.
Keywords. -adic lattices, ultrametric norms, orthogonalisation, query complexity, LVP, CVP, post-quantum cryptography.
1 Introduction
Zhang, Deng and Wang [12] extended this framework to finite-dimensional -vector spaces equipped with arbitrary ultrametric norms . They proved that LVP and CVP are solvable in polynomial time as soon as one is given an -orthogonal basis, a structure whose existence is always guaranteed in ultrametric geometry [10], and that CVP and the computation of such a basis are polynomially equivalent.
More recently, Zhang et al. [13] showed that the usual norm on a field extension reveals a uniformiser, from which an orthogonal basis can be built efficiently: this made LVP and CVP trivially solvable in polynomial time in that setting, and completely broke the first cryptosystem based on these structures [2]. Recalling that every ultrametric norm admits a “diagonal” form, out of which an -orthogonal basis can be read off immediately, the authors raised the following fundamental question: is it possible to find a diagonal form (or an orthogonal basis) of a given norm when one only has access to an evaluation oracle?
This paper gives the answer: one can compute an orthogonal basis, with at least exponentially many queries in the worst case.
Independently and very recently, Duan and Wu [4] studied the same norm-query model. They prove that orthogonalisation admits no uniform query bound depending only on the dimension: for every deterministic algorithm that outputs an -orthogonal basis for every ultrametric norm , the number of queries is unbounded as varies, even at fixed dimension.
While Euclidean lattice-based cryptography dominates the post-quantum landscape, -adic lattices offer a potential alternative should the hardness assumptions behind LWE turn out to be weakened, as suggested by the recent work of Daniel R. Simon [9].
1.2 Contributions and organisation
The first observation is that -adic commensurability—the equivalence relation when —is the right parameter governing the difficulty of the problems considered here: orthogonalization and orthogonality decision. In Section 3, we construct an explicit family, denoted , of norms whose distinction requires exponentially many oracle queries.
Let denote the largest multiplicity of a commensurability class of . The case , which yields the strongest lower bound below, includes many natural norms like the usual sup norm and every norm in the constructed family . We use to denote asymptotic lower bounds on the number of oracle calls. Our first main result, proved in Section 4, is:
Theorem 4.1: Lower Bound Orthogonalization. Any algorithm (deterministic, or randomised with success probability ) which reconstructs an -representation of from a norm oracle performs oracle calls in the worst case. In particular, when , the algorithm performs oracle calls.
We provide with Algorithm 2 an orthogonalisation algorithm with a query complexity of where is defined to be the geometric conditioning of the input basis.
For the decision problem, the relevant parameter is instead the size of the largest commensurability block in the input family, denoted . In particular, for the usual sup norm and every norm in , all nonzero vectors are commensurable. Thus, a family of vectors has , and a basis . This leads to our second main result (Section 5):
Theorem 5.4: Lower Bound Decision. Any algorithm (deterministic, or randomised with success probability ) that decides whether a basis is -orthogonal performs oracle calls in the worst case. In particular, when the algorithm performs oracle calls.
We show that these bounds are tight (up to polynomial factors). In the single-block case , Algorithm 4 makes oracle calls. Combined with the lower bound, we get a tight bound of .
Our exponential lower bounds do not result from an unbounded or degenerate family of norms. The family is finite, explicit, and all its members take their values in . Nevertheless, distinguishing its elements already requires queries. We identify two distinct parameters that govern the cost of orthogonalization. The multiplicity of the largest commensurability class yields an intrinsic barrier , whereas the geometric conditioning of the instance (defined in Section 4.2) accounts for the failure of a uniform bound over all norms, as shown by Duan & Wu in [4].
By contrast, when a diagonal representation is given, our residual commensurability criterion (Section 5) decides orthogonality in arithmetic operations: hardness lies in the norm oracle, not only in the norm structure itself.
Theorem 5.1: Residual Commensurability Criterion. Let be a norm on and let be nonzero vectors of . Let be their commensurability classes and the associated residual matrices of leading digits. Then the family is -orthogonal if and only if over for every block .
SAGEMATH implementations of all our algorithms are publicly available at: https://github.com/Synthettikk/p-adic-Lattices-for-Cryptography.
2 Norms and p-adic lattices
2.1 The norm-oracle model
Throughout the paper we consider a black-box norm oracle: it takes as input a vector in and returns the exact value of its norm. For each fixed norm , we assume that its values are taken in a discrete subset , allowing exact equality tests, order comparisons, tests for membership in , and usual arithmetic operations.
We distinguish oracle-query complexity from arithmetic complexity. For algorithms operating through a norm oracle, our bounds concern the number of oracle queries, while the associated arithmetic work is measured separately and may depend on that number of calls. Each individual arithmetic operation is assumed to have polynomial cost.
2.2 Basic facts on p-adic numbers
We recall the minimal background on -adic numbers; more details can be found in [8]. Let be a prime number. For , write with , and dividing neither nor , and set , . Then is a non-archimedean absolute value on : it is multiplicative, it vanishes only at 0, and it satisfies , with equality whenever . We call this last property the ultrametric inequality (or the ultrametric equality when it is one).
We denote by the completion of for , by its ring of integers — a compact discrete valuation ring, with maximal ideal and valuation — and by its group of units. For a positive integer , we denote by the projective space of , which we simply regard as the set of one-dimensional subspaces (the vector lines) of . It is well-known that .
2.3 Norms and orthogonal bases
Since is a field, -vector spaces are defined as usual; we denote them by , and assume throughout that is finite. A norm on is a map such that if and only if , for all and , and for all , with equality whenever — the ultrametric inequality again. Note that, by induction, it yields as soon as the are pairwise distinct.
Proposition 2.1 (Weil, [10]). Let be a norm on . Then there is a decomposition of into a direct sum of one-dimensional subspaces such that
for all .
Definition 2.2 (N-orthogonal basis, [10]). Let be a norm on . A basis of is -orthogonal if the decomposition with satisfies (1). A family of nonzero vectors is -orthogonal if it is an -orthogonal basis of the subspace it spans.
Thus Proposition 2.1 states that for any norm , admits an -orthogonal basis. The directness of the sum is in fact a consequence of (1): if then for every . As such, proving (1) is enough to characterise orthogonality.
Theorem 2.3 (Goldman–Iwahori, [13]). Let be a basis of . Then every norm on can be written as
where , and .
Proof. By Proposition 2.1 there is an -orthogonal basis of ; put and let be the change of basis matrix, .
We call -representation of a norm on its expression in the form of Theorem 2.3, and say that is given in diagonal form when it is presented by such a pair .
The proof makes it clear that knowing an -representation of is the same as knowing an -orthogonal basis: the columns of are the coordinates, in the basis , of the vectors of an -orthogonal basis.
Since is invertible, its rows define a basis of the dual space . We write for the corresponding -th linear form, i.e. for every . The norm then reads .
Example 2.4. Consider the norm defined, for every expressed in a basis of , by
that is, , , and , , , so that is the lower triangular matrix all of whose entries on and below the diagonal are 1. The columns of then give , , , an -orthogonal basis.
Proposition 2.5. If is an -orthogonal basis of and with , then is -orthogonal.
Proof. , and the ultrametric equality concludes.
This is very good news: unlike in the real case, no infinite precision is needed to know orthogonality exactly. We finally record three lemmas that will be used repeatedly.
Lemma 2.6 ([1, 11]). Let be a norm on . (i) basis of is -orthogonal if and only if for all such that one of them is a unit and the other lie in . (ii) family with is -orthogonal if and only if for whenever satisfy .
Lemma 2.7. Let be a family of vectors of with . Then is -orthogonal if and only if for all , not all zero.
Proof. By Lemma 2.6, the only combinations that can make the norm drop are those whose scalars are all divisible by ; so if there are , not all zero, with , the family is not -orthogonal. Conversely, if it is not -orthogonal, there are , with and at least one nonzero, such that ; since , the strict ultrametric inequality gives .
2.4 Commensurability and orthogonality
Let be a norm on and let be a diagonal representation of . We write for the classes induced by the values , and call them commensurability classes. The set of values taken by being discrete, the balls , which are free -modules, stagnate and then grow by sudden jumps as the radius increases: one gets an infinite chain of strictly nested lattices, that is, a filtration, whose associated graded piece is an -vector space of dimension
the multiplicity of the class of . We write in particular ; for instance the parameters , , of Example 2.4 give three distinct classes modulo , so that there.
We are also interested in the commensurability of given vectors of : two nonzero vectors are commensurable (with respect to ) when the ratio of their norms lies in the image of , that is when , and incommensurable otherwise. This is clearly an equivalence relation, and here is why it is relevant to orthogonality.
Proposition 2.8. Let be a norm on . Two incommensurable vectors are -orthogonal.
Proof. Let ; if one of them vanishes, the equality is obvious. Otherwise while , so that ; in particular this ratio cannot equal 1, the two norms differ, and the ultrametric equality gives the claim.
Remark 2.9. (i) The converse is false: for the usual sup norm on all nonzero vectors are commensurable, yet many of them are -orthogonal. (ii) A norm oracle is enough to determine commensurability. (iii) If the vectors of a family are pairwise incommensurable, then the family is -orthogonal: this is the case of Lemma 2.10 below.
Commensurability classes split orthogonality into independent blocks, which is the key idea behind all the algorithms of this paper.
Lemma 2.10 (block decomposition). Let be nonzero vectors of and let be their commensurability classes. Then is -orthogonal if and only if each block is -orthogonal.
Proof. A subfamily of an -orthogonal family is -orthogonal, which gives one implication. Conversely, assume that every block is -orthogonal and let . Grouping the terms blockwise, write with . By orthogonality of the block we have , which lies in the class of whenever . The classes being pairwise distinct, the nonzero are pairwise distinct, so that .
Given a family of vectors of , we write () for the commensurability classes of its vectors, for the number of vectors in , and . These classes can be computed from the oracle alone, by Algorithm 1 above; they span subspaces which are automatically -orthogonal to one another, and by Lemma 2.10 nothing else has to be checked outside the blocks. Inside a block, however, nothing is known yet: one has to refine the criterion and look for a cancellation of the leading terms in a linear combination. Methods for this are given in Section 5.
Algorithm 1 computes the commensurability classes of a family of vectors in oracle queries and at most divisions. In the most expensive case, all the vectors of are pairwise incommensurable, and thus, one gets that is orthogonal for free.
Algorithm 1: Commensurability classes
Input: vectors of , a norm oracle for
Output: the list of the commensurability classes
1 precompute the norms ;
2 ; ;
3 while do
4
5 ;
6
7 return ;
Example 2.11. Take again the norm of Example 2.4 and consider the basis
whose vectors are the columns. One has , and . As such, the commensurability classes are and and . One can normalize by replacing it with . We will see in Example 5.2 that the basis is not -orthogonal.
2.5 p-adic lattices, LVP and CVP
We first recall the definition of a p-adic lattice.
Definition 2.12 (p-adic lattice, [3]). Let be a norm on and let be linearly independent vectors of . A -adic lattice in is the set
of all -linear combinations of . The integers and are called respectively the rank and the dimension of the lattice. When , the lattice is said to be of full rank.
Every -adic lattice is a compact subset of . Moreover, by [7, p. 72], if is compact then is finite for every , and is discrete in for every ; this is what makes the two problems below well defined. Finally, if is an -orthogonal basis of the subspace of , it is called an -orthogonal basis of the lattice [1].
Definition 2.13 (LVP and CVP, [12]). Let be a -adic lattice in . Set and . The longest vector problem (LVP) asks for a vector with , the second-largest distinct norm value attained on . Given a target vector , the closest vector problem (CVP) asks for a vector satisfying .
Deng et al. [3] gave deterministic exponential algorithms for LVP and CVP. These problems are therefore natural candidates for cryptographic hardness assumptions. Since both become polynomial-time solvable when an -orthogonal basis is available [12], understanding the complexity of computing such a basis is essential for assessing the hardness of -adic lattices constructions. We thus focus on the problem of computing an -orthogonal basis of and on its associated computational complexity.
3 A family of norms:
To provide lower complexity bounds for the proofs of the subsequent sections, we define a family of norms whose elements are exponentially hard to distinguish. It is indexed by the vector lines of the projective space .
Definition 3.1 (the family ). For a vector line , take , , and lift it to an element . By construction is primitive — its coordinates lie in and at least one of them belongs to — so that it can be completed into a basis of . We define the norm on as follows: if , then
and we set .
Each is indeed an ultrametric norm on : with the notation of Theorem 2.3, it is given in the basis by and . In particular all the norms of take their values in , and they all satisfy : the family is as far as possible from the incommensurable (easy) case.
Lemma 3.2. Let and . The unit ball of is . Consequently, for a primitive vector ,
and the norms of are pairwise distinct. In particular .
Proof. Let be written in the basis . Then if and only if and for , that is, and for ; whence the unit ball.
Let now be primitive, so that all the lie in . Since is a basis of , we have if and only if and . In that case and for , so ; otherwise there is some with , so that , while and for every , whence . Finally, for in , the primitive vector satisfies (as ) and (as ); hence , and the cardinality is that of .
Proposition 3.3. Set . For any nonzero vectors of , there exist two distinct norms of which coincide on each of them. Consequently, at least vectors are needed to tell apart all the norms of , and this bound is sharp.
Proof. For , write with primitive, and let be the vector line defined by . By Lemma 3.2 there are distinct norms in , and the set has at most elements, so there are two distinct lines . For every , belongs neither to nor to , so that by (2); by homogeneity , and both norms coincide on the 's. Conversely, vectors attached to pairwise distinct projective lines do separate the family: given , at least one of these two lines is represented, say , and then .
4 Orthogonal basis computation
Recall that knowing an -representation of the norm is equivalent to knowing an -orthogonal basis, by Theorem 2.3 and its proof; in that model, orthogonalisation — hence LVP and CVP, by [12] — is polynomial. We therefore assume in this section that only a norm oracle is available.
4.1 Lower bound: no polynomial algorithm
Theorem 4.1 (Lower Bound Orthogonalization). Any algorithm (deterministic, or randomised with success probability ) which reconstructs an -representation of from a norm oracle performs oracle calls in the worst case. In particular, when , the algorithm performs oracle calls.
The idea is that, on any nonzero query, all norms in return the same answer, except the one whose secret direction matches the queried vector. Whenever the oracle returns the answer shared by all the other norms, the query eliminates at most one candidate. After fewer than such queries, at least two distinct norms remain consistent with all the answers received, and the algorithm cannot distinguish them.
Proof. Assume first and set . By the argument of Proposition 3.3, each nonzero query , with primitive, tests only the line .
Let be deterministic and make at most queries. Consider its execution when each such query receives the answer . If , at least distinct norms produce the same execution and output, so cannot be correct on every input. Thus deterministic reconstruction requires .
Moreover, can be correct on at most norms whose lines were tested and at most one of the remaining norms. Under the uniform distribution on , its success probability is therefore at most . Yao's principle gives for randomised algorithms succeeding with probability at least on every input. Both bounds are .
For , apply the same construction in the first coordinates and define
where and are pairwise incommensurable. The largest commensurability multiplicity is then . The last coordinate directions are orthogonal to the first -dimensional block and to one another. Their weights are fixed and may be assumed known, so the only unknown part of the norm lies in the first block. On each query, all but at most one norm in this extended family still return the same answer. Since the multiplicity of the class is , the same counting argument gives queries.
4.2 The algorithm
To lighten the notation, we write where is a basis of . Here is the fundamental criterion used by the algorithm.
Lemma 4.2. Let be a basis of endowed with a norm such that, for every ,
Then is -orthogonal.
Proof. Set . If satisfies , the ultrametric equality gives . Since gives the value , the minimum may be sought over the compact set , and is therefore attained. Assume now that there is with (the inequality being automatic), let achieve the maximum, so that , and put . Then , contradicting the minimality of .
In other words, local descent implies global optimality: no random restart is needed, in contrast with real gradient descent — an important point, since the orthogonalisation algorithm with an oracle is exactly a discrete -adic descent: one starts from a defect of minimality in the norms of the and corrects it by finding making minimal. Such a correction is exactly an instance of CVP, the ultrametric inequality restricting the search space to the ball , a finitely generated -module; it is this geometric reduction of a vector problem to a lattice problem that gives a transparent intuition for the polynomial equivalence, already known, between orthogonalisation and CVP.
The next lemma is the engine of the algorithm: it makes the descent test finite and confines it to a single commensurability block.
Lemma 4.3. Let be an -orthogonal family, , and let with . Set
so that for . Then is -orthogonal if and only if
Moreover .
Proof. By Lemma 2.10, is -orthogonal if and only if each of its commensurability blocks is. The blocks that do not contain are subfamilies of , hence are orthogonal; the block containing is , which after the normalisation — a rescaling that changes neither the block nor its orthogonality — consists of vectors of norm . By Lemma 2.7, that block is orthogonal if and only if for all not all zero; if this holds automatically, the being already orthogonal, and if , dividing by the unit brings us back to the stated form. Finally, the same criterion applied to the family shows that every nonzero -linear combination of these vectors has norm by orthogonality. Therefore, their images in are -independent, thus .
We can now build in Algorithm 2 a recursive algorithm to compute an -orthogonal basis out of a basis of . At step , assuming orthogonal, it checks whether the norm of can be made to drop by subtracting an -linear combination of those that are commensurable with it; if so it replaces by the new vector (it goes down one “floor”) and starts again, until no further descent is possible, i.e. until the global minimum has been found. When no -linear combination makes the norm drop, is orthogonal to by Lemma 4.3.
To evaluate the complexity of this algorithm, we must bound the number of times the norm of a vector can drop. At the -th iteration, let denote the vector selected at step 3 of the algorithm, its norm and let be the subspace spanned by the first orthogonalised vectors. Since and is closed, the distance between and , is strictly positive. Recall that the set of values taken by
Algorithm 2: DESCEND: orthogonalisation with an oracle
Input: a norm oracle for on , a basis
Output: an -orthogonal basis of
1 ; ;
2 for do
3 \quad ; ;
// descent to a best approximation (CVP)
4 while true do
5 \quad ;
6 \quad for ;
7 found false;
8 \quad foreach do
9 \quad
10 \quad if not found then break
11 \quad // is optimal;
12 ; ; ;
13 return ;
is contained in . For each , the class contains at most one element in the interval , since two consecutive elements of this class differ by a factor . Hence the norm can take at most distinct values on an interval . Since each update makes the norm drop strictly, after at most updates the norm is at most . Repeating this argument, after updates the working vector satisfies . On the other hand, every working vector is of the form , so its norm is at least . Therefore the number of updates is at most .
We thus define the geometric conditioning of the instance as the maximal number of descents,
a parameter which is finite and fixed by the input.
Proposition 4.4 (termination, complexity, correctness). Algorithm 2 is correct and terminates after finitely many steps, with a query complexity of
Proof. By definition of , for each vector the algorithm finds at most successive combinations that decrease the norm, hence performs at most complete explorations of a level (the last one certifying optimality). During one exploration, the space of coefficients has size at most by Lemma 4.3, so a level costs oracle calls; summing over the basis vectors gives the announced complexity, and in particular termination.
Finally, assume by induction that is orthogonal. At step the loop stops when the search over fails, which by Lemma 4.3 means exactly that is -orthogonal.
Comparing with the lower bound , the algorithm is optimal up to a factor . Certifying that a basis is -orthogonal, on the other hand, requires solving the orthogonality decision problem, which is the subject of the next section.
Example 4.5. Take again the norm , assuming , and the basis of Example 2.11. Since and belong to distinct commensurability classes (generated by 1 and ), they are -orthogonal from the start and we set , . The vector , on the other hand, is commensurable with : Algorithm 2 first normalises it as , of norm , then kills the dependency in the residual space of the class by a cancellation modulo ,
whose norm drops strictly to (because ): the vector has just changed commensurability class and joined that of . A second elimination, now in the class of 1, gives
of norm : has reached the class of , which was vacant, so that is an -orthogonal basis by Remark 2.9(iii). For readability we used -1 to represent modulo ; by the ultrametric inequality, it does not affect whether the norm of the corresponding combination drops or not.
Finally, it is clear that depends on the chosen norm: it is the algorithmic conditioning of the instance, and depending on it can be arbitrarily large. This exhibits the two distinct parameters that govern the cost. The multiplicity of the largest commensurability class yields an intrinsic barrier that no algorithm can cross, whereas the geometric conditioning is exactly what makes a uniform bound fail, as in [4]. From a cryptographic perspective, being unconditional on the algorithm makes it desirable as a plausible security parameter while the handling of may need more investigation.
5 Deciding orthogonality
5.1 The residual commensurability criterion
In this subsection, suppose that an -representation of the norm is known. Let be a family of nonzero vectors of and let () be its commensurability classes. In each block we may normalise every vector, , so that all the have the same norm ; we define , the residual matrix with coefficients in containing the leading digits of the dominant , as follows.
The columns of are indexed by the indices such that . The rows of are indexed by the indices such that for some .
For such a couple of and , . As takes its values in , this forces , say with . In that case, one can write and . For the same and other 's of the same commensurability class, , thus, and is equal to 0 when .
As such, we can define , a matrix with coefficients in , as follows: for such that and for such that reaches ,
Theorem 5.1 (Residual Commensurability Criterion). Let be a norm on and let be nonzero vectors of . Let be their commensurability classes and the associated residual matrices of leading digits. Then the family is -orthogonal if and only if over for every block .
Algorithm 3: Residual commensurability with
Input: a family of vectors of size , a diagonal representation of a norm
Output: true if is -orthogonal, false otherwise
1 compute the commensurability classes with Algorithm 1;
2 if card then return true // pairwise incommensurable;
3 foreach class of vectors, of common norm do
4
5
6 return true;
Proof. By Lemma 2.10 the family is -orthogonal if and only if each block is, so we may work inside a single block of commensurability, of size say; and the normalisation with does not affect orthogonality — the factor is absorbed by the coefficients of the linear combination — so we may assume that all the have norm . By Lemma 2.7, the block is then -orthogonal if and only if for every with .
Let us assume that our block is not -orthogonal. Let be a corresponding combination with . Then . As such, for any , . Consequently, for a given , and for every , . By the ultrametric inequality, it means that in and thus
This means that is a non-zero element of , which proves the first implication.
Conversely, let be a non-zero element of and let be the index of a row of . We get that . As before, for every , and in addition, . This means that , and thus . Consequently, for any , , and finally, , which concludes.
Theorem 5.1 gives an algorithm to test orthogonality: compute the commensurability classes, build the matrix of each block from the formula above — reading off the valuations and the leading digits of the , which costs basic operations for a block of size — and compute its kernel.
One optimisation can be added: a matrix with strictly more columns than rows already has a non-trivial kernel. As such, kernel computation can be avoided for the so-called ‘wide’ matrices. The resulting Algorithm is presented as Algorithm 3.
In the worst case all the vectors are commensurable and the kernel computation cannot be split into smaller blocks and dominates the running time, which gives elementary operations. It becomes linear in the favourable cases.
Example 5.2. Take again the norm and the basis of Example 2.11, where is alone in its commensurability class while and are commensurable with each other. The last vector is replaced by . We get that . This value is reached only by . The and are not even commensurable with . As such, has one row and two columns, being equal to . The kernel vector even exhibits the cancellation, , which is precisely the one that made the norm drop in Example 4.5.
Remark 5.3. (i) For the sup norm, all vectors can be normalised so that their norm becomes 1. The matrix is then simply the matrix of the normalised vectors mod , and the family is orthogonal if and only if has maximal rank. (ii) This criterion requires knowing a diagonal representation of the norm: both the and the are needed.
5.2 With a norm oracle
The previous subsection decides orthogonality when an -representation of the norm is available. With only a norm oracle at hand, kernel computations are out of reach. Given a block of commensurable vectors, all of norm — the commensurability classes themselves are computed with Algorithm 1 — Lemma 2.7 tells us it is enough to check whether for every , not all zero. This naively gives combinations. However, if makes the norm drop, so does for every , since ; working in the projective space avoids these repetitions and leaves
norm computations to perform. This remains exponential in , hence not very practical. It is worth noting that it is exactly the count obtained by Duan and Wu for the worst-case query complexity of the LVP in a lattice of rank [4].
We write for the number of vectors in the largest commensurability class; it can be any integer between 1 and , depending entirely on the family being tested, and is known as soon as the classes have been computed. This leads us to the following theorem.
Theorem 5.4 (Lower Bound Decision). Any algorithm (deterministic, or randomised with success probability ) that decides whether a basis is -orthogonal performs oracle calls in the worst case. In particular, when the algorithm performs oracle calls.
Proof. Let us place ourselves in the worst case and take for the canonical -basis of . Let , for . Then for any primitive vector and thus, thanks to Lemma 4.3, is -orthogonal.
Now, let us assume that there is a deterministic algorithm that can decide orthogonality of bases of in at most norm oracle queries. We apply it to and . It answers “True” and call the norm oracle for the vectors for some . For any , let us write with primitive. Let be distinct from the residual lines and and let be the corresponding norm. Thanks to Lemma 3.2, and , thus . However, is not orthogonal as there is a linear combination with coefficients in corresponding to making the norm drop. The algorithm being deterministic and accessing norms only through a norm oracle, if it is given and , it should make the exact same operation and the same queries as for and . As such, the exact same execution can not provide two distinct answers (“True” and “False”), contradicting the hypotheses.
For the randomised case, take the distribution that picks with probability , and otherwise a uniform among the admissible ones: a deterministic algorithm making queries then errs with probability at least , so an error probability forces , and Yao's principle concludes. Finally, running the same construction inside the largest commensurability block, of size , and completing with pairwise incommensurable directions (which are orthogonal to everything by Proposition 2.8 and cost nothing to handle), gives .
Algorithm 4: Residual commensurability with oracle
Input: a family of vectors of size ; a norm oracle for
Output: true if is -orthogonal, false otherwise
1 compute the commensurability classes with Algorithm 1;
2 if then return true // pairwise incommensurable;
3 foreach class of vectors, of common norm do
4
6 return true;
The matching algorithm is written as Algorithm 4.
Inside each block of commensurable vectors of common norm , it enumerates the projective combinations with coefficients modulo and returns false as soon as one of them has norm . Its complexity is then
In the worst case, the largest block alone contributes oracle queries. This is precisely the contribution captured by our lower bound in Theorem 5.4. When there is a single block, this gives a matching bound
6 Conclusion and further work
The hardness of the orthogonalisation and decision problems comes above all from the representation of the norm and from commensurability: when all the vectors are pairwise incommensurable everything becomes polynomial, whereas the complexity is exponential in (resp. ) otherwise. Moreover, the proofs of Theorems 4.1 and 5.4 show that these problems amount to identifying a hidden subgroup — here a hidden line of — through membership queries, a setting whose hardness is well understood [5]: it does admit Grover-type quantum speed-ups, in , but nothing better is known to date and the gain remains marginal. To escape the exponential regime one has to change the oracle model; an oracle returning both the value of the norm and an index achieving the maximum, for instance, would give information on the linear forms directly, with no exhaustive search.
We therefore leave the following question open: what is the hardness of these problems in the intermediate case where the norm is given neither by a diagonal form (the easy case) nor by a black-box oracle (the hard case), but by a public representation designed to hide a diagonal form? In other words, is it possible to build a representation of a norm that reveals no -orthogonal basis? This opens the way to new asymmetric cryptographic constructions.
References
[1] Yingpu Deng. “On p-adic Gram–Schmidt Orthogonalization Process”. In: Frontiers of Mathematics 20.2 (2025), pp. 299–311.
[2] Yingpu Deng, Lixia Luo, Yanbin Pan, Zhaonan Wang, and Guanju Xiao. “Public-key cryptosystems and signature schemes from p-adic lattices”. In: p-Adic Numbers, Ultrametric Analysis and Applications 16.1 (2024), pp. 23–42.
[3] Yingpu Deng, Lixia Luo, Yanbin Pan, and Guanju Xiao. "On some computational problems in local fields". In: Journal of Systems Science and Complexity 35.3 (2018), pp. 1191–1200.
[4] Zhefan Duan and Huawei Wu. "Norm-Query Complexity of Algorithmic Problems in Finite-Dimensional p-adic Normed Spaces". In: arXiv preprint arXiv:2608.22084 (2026).
[5] Simone Dutto, Pietro Mercuri, Nadir Murru, and Lorenzo Romano. "A survey about Hidden Subgroup Problem from a mathematical and cryptographic perspective". In: arXiv preprint arXiv:2512.02087 (2025).
[6] National Institute of Standards and Technology. Post-Quantum Cryptography. last accessed 2026-08-05.
[7] Alain M Robert. A course in p-adic analysis. Vol. 198. Springer Science & Business Media, 2000.
[8] Jean Pierre Serre. Corps locaux. Institut de mathématiques de l'université de Nancago, 1968.
[9] Daniel R. Simon. A Polynomial-Time Quantum Algorithm for the Dihedral Coset Problem. Cryptology ePrint Archive, Paper 2026/1591. 2026.
[10] André Weil. Basic number theory. Vol. 1974. Springer, 1967.
[11] Chi Zhang and Yingpu Deng. "An Explicit Construction of Orthogonal Basis in p-adic Fields". In: arXiv preprint arXiv:2410.17982 (2024).
[12] Chi Zhang, Yingpu Deng, and Zhaonan Wang. "Norm orthogonal bases and invariants of p-adic lattices". In: Linear Algebra and its Applications (2025).
[13] Chi Zhang and Mingqian Yao. "Notes on the LVP and the CVP in p-adic Fields". In: arXiv preprint arXiv:2512.24207 (2026).