arXiv:2611.03578cs.ITNov 2026

Manuscript Offprint

arXiv:2611.03578

Uniform Sampling of Linear Codes with Prescribed Hull Dimension

Keita Ishizuka

Abstract

We give exactly uniform samplers for linear codes with prescribed hull dimension, for the Euclidean, Hermitian, and symplectic inner products and over finite fields of every characteristic. Except for the Euclidean form over fields of odd characteristic, these are the first uniform samplers for arbitrary prescribed hull dimension. Each sample costs an expected O(k2N+klog⁡q)O(k^2 N + k \log q) field operations for codes of dimension kk in a space of dimension NN over Fq\mathbb{F}_q or Fq2\mathbb{F}_{q^2}.

Keywords— Linear codes, hull dimension, uniform sampling, classical groups, Witt's theorem, LCD codes, self-orthogonal codes, entanglement-assisted quantum codes, code-based cryptography.

1 Introduction

Up to a scalar, a non-degenerate reflexive form on a finite-dimensional vector space is symmetric, alternating, or Hermitian [30, Thm. 7.1]. On codes these give the Euclidean, symplectic, and Hermitian inner products, and for each of them the hull Hull(CC) := C∩C⊥C \cap C^\perp of a code CC plays an important role in coding theory, cryptography, and quantum error correction. Binary Euclidean LCD codes (Hull(CC) = 0) are used in countermeasures against side-channel and fault-injection attacks [9]. Euclidean self-orthogonal codes (Hull(CC) = CC) are needed for instance generation in the code-based signature scheme SPECK [4], and codes with a prescribed Euclidean hull dimension

*K. Ishizuka is with the Information Technology R&D Center, Mitsubishi Electric Corporation, Kamakura, Japan (e-mail: keitaishizuka1994@gmail.com).

†This work was supported by JSPS KAKENHI Grant Number JP25K17290.

are the central primitive of the Hollow LWE encryption scheme [1]. Codes in Fq2n\mathbb{F}_q^{2n} with symplectic hull dimension ℓ\ell are the check spaces of entanglement-assisted (EA) stabilizer codes on nn qudits that consume (dim⁡C−ℓ)/2(\dim C - \ell)/2 ebits, and codes in Fq2n\mathbb{F}_{q^2}^n with Hermitian hull dimension ℓ\ell give EA stabilizer codes consuming dim⁡C−ℓ\dim C - \ell ebits [7, 33] for qubits and [16] for all qq; the self-orthogonal case is that of ordinary stabilizer codes [3, 8, 20]. Uniform sampling of such codes is useful in each of these settings: it offers a complementary approach to the classification of codes, it drives Monte Carlo simulation of quantum codes, and in Hollow LWE and SPECK the uniform sampling of codes with prescribed Euclidean hull dimension is part of the scheme itself.

For the Euclidean inner product, Albrecht, Benčina, and Lai gave a partial result in Hollow LWE [1]: their sampler grows the hull one dimension at a time and is proved uniform when 2ℓ≤k2\ell \leq k, where kk is the dimension and ℓ\ell the hull dimension. The same authors later gave a sampler for odd qq that, for nn and qq polynomial in kk, aborts with negligible probability and is otherwise exactly uniform for a prescribed hull dimension and square class of the discriminant of C/Hull(C)C/\mathrm{Hull}(C) [2, Thm. 28], with the mass formula of Li, Shi, and Ling [22] used in the analysis; for a prescribed hull dimension alone, it picks the square class uniformly at random and is within total variation distance q−(k−ℓ)/2q^{-(k-\ell)/2} of uniform [2, Cor. 30]. The case of even qq was left open. For self-orthogonal codes and odd qq, an ε\varepsilon-uniform sampler was given in the conference version of the present paper [19]. For the Hermitian and symplectic inner products, uniform samplers are known only for special hull dimensions. Uniformly random symplectic self-orthogonal codes, that is, stabilizer codes, are obtained by applying a uniformly random Clifford operator to a fixed stabilizer code, and the nn-qubit Clifford group can be sampled exactly [6, 21]. No uniform sampler was available for a prescribed Hermitian or symplectic hull dimension, that is, for EA codes with a prescribed number of ebits. Table 1 summarizes the situation.

Table 1: Exactly uniform samplers of codes with prescribed hull dimension ℓ\ell and dimension kk.

inner productprevious workthis work
symplecticℓ=k,q=2\ell = k, q = 2 [6, 21]all ℓ\ell, all qq
Hermitiannoneall ℓ\ell, all qq
Euclidean, qq oddall ℓ\ell, per square class [2]all ℓ\ell
Euclidean, qq evennoneall ℓ\ell

References (30)