arXiv:2610.26808cs.ITOct 2026

Manuscript Offprint

arXiv:2610.26808

Block basis reduction for linear codes in non-Hamming metrics

N. S. Kolesnikov, S. A. Novoselov

Kolesnikov N. S. [0000−0002−3346−4042][0000-0002-3346-4042] and Novoselov S. A. [0000−0003−3857−8548][0000-0003-3857-8548]

Immanuel Kant Baltic Federal University, ul. Nevskogo 14, Kaliningrad, Russia, 236041

Abstract. In this paper, we generalize the code basis reduction to non-Hamming metrics. We propose a block basis reduction (BKZ) algorithm for codes that works for all coordinate-additive metrics. Our algorithm is a generalization of the algorithm of Ghentiyala and Stephens-Davidowitz, which in turn is an adaptation of the famous BKZ algorithm for lattices to linear codes and the Hamming metric. For block size 2 (LLL), we propose a polynomial-time algorithm with complexity O(n4q3)\mathcal{O}(n^4 q^3) operations in Fq\mathbb{F}_q, where nn is the length of the code and qq is the alphabet size. For the Lee metric we provide an implementation of our algorithms and present experimental results on finding low Lee weight codewords.

Keywords: linear codes · basis reduction · low-weight codewords · non-Hamming metrics · Lee metric.

1 Introduction

One of the most well-studied metrics in coding theory and cryptography is the Hamming metric. It is known that the decoding problem for codes in the Hamming metric is NP-complete [7,4]. This means that we do not expect the invention of an efficient algorithm for solving the problem. This makes the decoding problem a solid foundation for construction of cryptographic schemes. Recently, it was proven that the Lee metric (see [21, §10]) syndrome decoding problem, and in general the decoding problem for any coordinate-additive metric, is NP-complete [26]. This makes code-based schemes in non-Hamming metrics interesting for cryptography. The coordinate-additive metrics include Hamming, weighted Hamming [9], and Lee metrics. These metrics also have many applications outside cryptography [8,22,14]. The survey of available metrics can be found in [13]. The Lee metric has recently begun to attract attention in cryptography. It already has some available constructions. While first attempts [20] to build a signature scheme have failed [17] due to lattice-based attacks [16], the work [23] proposes a signature scheme that still resists all known attacks. Besides signatures and an analog of the McEliece scheme (analyzed in [16]), there is a zero-knowledge proof [19] and a private information retrieval scheme [2]. However, since cryptographic schemes based on codes in the Lee metric is a relatively new topic in cryptography, more cryptanalysis is required. In our paper, we study the code basis reduction approach for solving the decoding problem.

N.S. Kolesnikov, S.A. Novoselov

and finding low-weight codewords. The concept of the basis reduction was introduced for the Hamming metric in [12] as an adaptation of the LLL algorithm from lattices to codes. The basis reduction allows one to obtain a basis with weight-reduced first element and which is more “balanced” (= better for decoding using analogs of lattice algorithms for solving the approximate closest vector problem). To address the decoding problem, the authors of [12] proposed an adaptation of Babai’s algorithm for lattices and combined it with information set decoding algorithms. The obtained hybrid algorithm allowed the authors to break the record in the low-weight codeword challenge [1]. The work [15] generalizes the basis reduction theory to non-binary finite fields and provides a BKZ algorithm for codes.

Our contribution. We generalize the BKZ algorithm [15] from the Hamming metric to any coordinate-additive metric. This is the first step towards construction of a decoding algorithm using reduction theory. For block size 2 (LLL), we propose a restricted version of the algorithm that outputs almost the same quality code bases, but in polynomial time. We provide an implementation 1^{1} of our algorithms for the Lee metric and experimental results for finding low-weight codewords using the basis reduction with comparison to the Gilbert-Varshamov bound for the Lee metric (provides approximate minimum distance of a random linear code) and other methods.

Organization of the paper. The §2 contains necessary background and notations. In §3 we show that notions of orthogonality and projections from [12,15] can be used for any coordinate-additive metric. Moreover, for the Lee metric we show that it is the only way to define projections with properties required by the BKZ algorithm. The §4 describes the block basis reduction (BKZ) algorithm that works in any coordinate-additive metric. In §5 we present the LLL algorithm for any coordinate-additive metric. The §6 contains description and implementation of the BKZ algorithm for the Lee metric. Results of experiments with the Lee metric BKZ algorithm are given in §7.

References (24)