Proving Resistance Against Infinitely Long Subspace Trails: How to Choose the Linear Layer

Lorenzo Grassi, Christian Rechberger, Markus Schofnegger

2020 · eprint 2020/500

Disclaimer

This content was automatically converted from the original PDF and may have undergone post-processing. None of these steps have been reviewed or approved by the authors. Errors in formulas, definitions, proofs, or text may have been introduced during conversion. The authoritative version is the original paper on ePrint. Always cite and verify against the original publication.

Converted with: marker · 2026-02-13

Abstract

Designing cryptographic permutations and block ciphers using a substitution-permutation network (SPN) approach where the nonlinear part does not cover the entire state has recently gained attention due to favorable implementation characteristics in various scenarios.

For word-oriented partial SPN (P-SPN) schemes with a fixed linear layer, the goal is to better understand how the details of the linear layer affect the security of the construction. In this paper, the authors derive conditions that allow to either set up or prevent attacks based on infinitely long truncated differentials with probability 1. The analysis considers (1) both invariant and non-invariant/iterative trails, and (2) trails with and without active S-boxes.

For these cases, rigorous sufficient and necessary conditions are provided for the matrix that defines the linear layer to prevent the analyzed attacks. A tool is presented that can determine whether a given linear layer is vulnerable based on these results. Furthermore, a sufficient condition for the linear layer is proposed that, if satisfied, ensures that no infinitely long truncated differential exists. This condition is related to the degree and the irreducibility of the minimal polynomial of the matrix that defines the linear layer.

Besides P-SPN schemes, the observations may also have a crucial impact on the Hades design strategy, which mixes rounds with full S-box layers and rounds with partial S-box layers.

Keywords: Partial SPN, Linear Layer, Subspace Trails, Hades Schemes

1. Introduction

Modern cryptography developed many techniques that go well beyond solving traditional confidentiality and authenticity problems in two-party communications. This includes practical applications of secure multi-party computation (MPC), (fully) homomorphic encryption (FHE), and zero-knowledge (ZK) proofs using symmetric primitives. Designs of primitives in symmetric cryptography for these applications are usually led by heuristics such as simplifying their arithmetic representations or linear operations being more efficient than nonlinear ones in these scenarios. The latter example is also used in the context of masking, a widespread countermeasure against side-channel attacks.

Driven by all these application areas, many new symmetric primitives have recently been proposed. They include on one hand masking-friendly designs like NOEKEON [DPAR00], PICARO [PRC12], Zorro [GGNPS13], LS-designs [GLSV14], and candidates from the currently ongoing effort of choosing a next "lightweight" generation of primitives. On the other hand, there is an increasing number of MPC-/FHE-/ZK-friendly proposals, including LowMC [ARS+15], FLIP [MJSC16], Kreyvium [CCF+18], Rasta [DEG+18], MiMC [AGR+16], GMiMC [AGP+19], HADESMiMC [GLR+20b], Ciminion [DGGK19], JARVIS and FRIDAY [AD18], Vision and Rescue [AAB+20], and POSEIDON [GKR+21].

1.1 Choosing the Linear Layer in Partial SPN Schemes

Some of the recalled designs (e.g., LowMC, Zorro, HADESMiMC and POSEIDON) reach the goal of minimizing the total number of multiplications by making use of rounds with a partial S-box layer. These designs are called partial substitution-permutation network (P-SPN) schemes. They are a variant of SPN schemes, in which an input block is transformed into an output block by applying several alternating rounds of substitution boxes and affine permutations. For a t-word SPN scheme over a fixed finite field, the substitution layer usually consists of t parallel (independent) nonlinear functions, called S-boxes. In many cases, the permutation layer is a linear operation defined by the multiplication of the state with a t \times t matrix. In the case of a P-SPN, however, part of the substitution layer is replaced by an identity mapping, leading to practical advantages for applications in which nonlinear operations are more expensive than linear operations.

Many strategies proposed in the literature to guarantee security for SPN schemes are no longer applicable to P-SPN schemes and have to be replaced by more ad-hoc approaches. This includes the well-known wide trail strategy [DR02], which is one of the main techniques for achieving security against various statistical attacks. In the case of Zorro, the heuristic argument proposed by the designers turned out to be insufficient, as iterative differential and linear characteristics were later found [WWGY14, BDD+15]. Similarly, the authors of LowMC chose the number of rounds to guarantee that no differential or linear characteristic can cover the entire function with non-negligible probability. However, they do not provide similarly strong security arguments against other attack vectors, and key-recovery attacks on LowMC have been found [DLMW15].

1.2 Our Contribution and Related Work

Automated characteristic search tools and dedicated key-recovery algorithms for SP networks with partial nonlinear layers have been presented in [BDD+15]. As a main result, this tool can be used to understand how many rounds a given scheme requires to be secure. However, focusing on the matrix that defines the fixed linear layer in a P-SPN scheme, it is not clear which properties this matrix must satisfy to prevent cryptanalytic attacks in general.

Our Goal. The authors aim at a relevant subset of undesirable properties that can lead to attacks: infinitely long truncated differentials with probability 1 [Knu94], or equivalently infinitely long subspace trails [GRR16a, GRR17], i.e., the existence of a nontrivial subspace \mathcal{U} \subseteq \mathbb{F}_q^t of inputs that is mapped into a proper (affine) subspace of the state space over any number of rounds.

Impact of Subspace Trails on Hades-Like Schemes. While such a subspace trail on its own represents a distinguisher, it can also be the starting point for an attack. A preimage attack on the hash function Poseidon based on the existence of such trails has recently been shown in [BCD+20, Sect. 6.2]. The attacked hash function is based on the Hades design strategy [GLR+20b], which uses external rounds with full S-box layers and middle rounds with partial S-box layers.

Infinitely Long Subspace Trails: Necessary & Sufficient Conditions for P-SPN Schemes. The authors present sufficient and necessary conditions that the matrix defining the linear layer must satisfy to guarantee that no infinitely long (nontrivial) subspace trails exist. Specifically, they analyze:

  1. the case without active S-boxes in which the input of the S-box is constant (Sections 3 and 4), and
  2. the case with active S-boxes in which the input of the S-box can take any possible value (Section 6).

In both cases, the analysis is independent of the round keys and round constants. In the particular case in which the matrix is diagonalizable, the infinitely long subspace trail (if existent) is always related to the eigenspaces of the matrix. More generally, the infinitely long subspace trails are always related to the invariant subspaces of the matrix M defining the linear layer, which can be found via the primary decomposition theorem.

Dedicated Tool. Together with the theoretical observations, practical Sage implementations are also provided. Given a square matrix, the tool can detect the vulnerabilities described in this paper (invariant and iterative trails), both in the case with and without active S-boxes and for binary and prime fields.

2. Preliminaries

Notation. The finite fields are denoted by \mathbb{F}_q, where q = 2^n or q = p^n for a prime p \geq 3 and n \in \mathbb{N}. For brevity, \mathbb{F} is used instead of \mathbb{F}_q. Subspaces are denoted with calligraphic letters (e.g., \mathcal{S}). Given a subspace \mathcal{S} \subseteq \mathbb{F}^t, \mathcal{S}^c denotes a complementary subspace such that \mathcal{S} \oplus \mathcal{S}^c = \mathbb{F}^t. The symbol \oplus denotes the direct sum. The unit vectors of \mathbb{F}_q^t are \{e_1, \ldots, e_t\}.

2.1 Partial SPN Schemes

The paper focuses on P-SPN block ciphers and permutations over (\mathbb{F}_q^t, +, \cdot). All results are independent of the round keys and constants.

Partial SPN (P-SPN) Schemes. The application of r rounds of a t-word P-SPN scheme is denoted by E^r : \mathbb{F}^t \to \mathbb{F}^t. Let 1 \leq s < \lceil t/2 \rceil be the number of S-boxes per round. The composition of the S-box layer and of the linear layer is:

R(x) = (M \circ S)(x) = M(S_1(x_1), \dots, S_s(x_s), x_{s+1}, \dots, x_t)

where S_i : \mathbb{F} \to \mathbb{F} for i \in \{1, \ldots, s\} is a nonlinear permutation, and hence t - s input words are unaffected by the S-box layer. The linear layer is defined by the multiplication with an invertible matrix M \in \mathbb{F}^{t \times t}.

Hades-Like Schemes. The recently proposed HADES strategy [GLR+20b] combines both SPN and partial SPN schemes. The initial R_f and the final R_f rounds contain full S-box layers, for a total of R_F = 2R_f rounds. In the middle, R_P rounds with partial S-box layers are used.

2.2 Invariant Subspaces and Subspace Trails

Definition 1 (Subspace Trail)

Let (\mathcal{U}_1, \ldots, \mathcal{U}_{r+1}) denote a collection of r+1 nontrivial subspaces with \dim(\mathcal{U}_i) \leq \dim(\mathcal{U}_{i+1}) < t. If for each i \in \{1, \ldots, r\} and for each a_i \in \mathbb{F}^t there exists a_{i+1} \in \mathcal{U}_{i+1}^c such that

R_i(\mathcal{U}_i + a_i) \subseteq \mathcal{U}_{i+1} + a_{i+1},

then (\mathcal{U}_1, \ldots, \mathcal{U}_{r+1}) is a subspace trail of length r. If the relations hold with equality, the subspace trail is called a constant-dimensional subspace trail.

Definition 2 (Invariant Subspace Trail)

Let \mathcal{U} \subset \mathbb{F}^t be a subspace. \mathcal{U} generates an r-round invariant subspace trail for the function F(\cdot) = R_r \circ \cdots \circ R_1(\cdot) if for each i \in \{1, \ldots, r\} and for each a_i \in \mathbb{F}^t there exists a_{i+1} such that R_i(\mathcal{U} + a_i) = \mathcal{U} + a_{i+1}.

Definition 3 (Iterative Subspace Trail)

Let (\mathcal{V}_1, \mathcal{V}_2, \ldots, \mathcal{V}_l) be a constant-dimensional subspace trail for l rounds with \dim(\mathcal{V}_i) < t. This subspace trail is an infinitely long iterative (constant-dimensional) subspace trail of period l if it repeats itself an arbitrary number of times, i.e., if

(\mathcal{V}_1, \mathcal{V}_2, \ldots, \mathcal{V}_l, \mathcal{V}_1, \mathcal{V}_2, \ldots, \mathcal{V}_l, \ldots)

is a subspace trail.

Proposition 1

Working over \mathbb{F}^t, let (\mathcal{V}_1, \ldots, \mathcal{V}_l) be an infinitely long iterative subspace trail of period l. If \dim(\langle \mathcal{V}_1, \ldots, \mathcal{V}_l \rangle) < t, then \langle \mathcal{V}_1, \ldots, \mathcal{V}_l \rangle generates an infinitely long invariant subspace trail.

2.3 Decomposition Theorem & Frobenius Normal Form

Definition 4 (Eigenspace)

Given an invertible matrix M \in \mathbb{F}^{t \times t}, the subspace \mathcal{P} = \langle \rho_1, \ldots, \rho_d \rangle \subseteq \mathbb{F}^t is the (right) eigenspace of M for the eigenvalue \lambda \in \mathbb{F} \setminus \{0\} if M \cdot \rho_i = \lambda \cdot \rho_i is satisfied for all i \in \{1, \ldots, d\}.

Definition 5 (Diagonalizable Matrix)

M \in \mathbb{F}^{t \times t} is a diagonalizable matrix if and only if there exists an invertible matrix P and eigenvalues \lambda_1, \ldots, \lambda_t such that P^{-1} \cdot M \cdot P = \operatorname{diag}(\lambda_1, \ldots, \lambda_t).

Definition 7 (Characteristic and Minimal Polynomial)

Let M \in \mathbb{F}^{t \times t} be an invertible matrix. The characteristic polynomial \psi \in \mathbb{F}[x] is defined as \psi(x) = \det(xI - M). The minimal polynomial \phi \in \mathbb{F}[x] is the monic polynomial of minimal degree such that \phi(M) \cdot v = 0^t for each v \in \mathbb{F}^t, and for each annihilating polynomial p, \phi divides p.

Definition 8 (M-invariant Subspace)

Let M \in \mathbb{F}^{t \times t} be invertible and \mathcal{V} \subseteq \mathbb{F}^t. \mathcal{V} is M-invariant if and only if M \cdot \mathcal{V} = \mathcal{V}.

Definition 10 (Frobenius Normal Form)

Let M \in \mathbb{F}^{t \times t}. The Frobenius normal form of M is the matrix F \in \mathbb{F}^{t \times t} for which there exists an invertible matrix Q such that F = Q \cdot M \cdot Q^{-1} = \operatorname{diag}(C_1, C_2, \ldots, C_l), where each C_i is the companion matrix associated to a monic polynomial p_i(x) such that p_i divides p_{i+1}, and p_l corresponds to the minimal polynomial \phi of M.

Theorem 1 (Primary Decomposition Theorem)

Let M \in \mathbb{F}^{t \times t} be invertible with minimal polynomial \phi(x) = [p_1(x)]^{\alpha_1} \cdot [p_2(x)]^{\alpha_2} \cdots [p_m(x)]^{\alpha_m}, where p_i(\cdot), p_j(\cdot) are monic, irreducible, and relatively prime. Then

\mathbb{F}^t = \mathcal{A}_1 \oplus \mathcal{A}_2 \oplus \cdots \oplus \mathcal{A}_m,

where \mathcal{A}_j := \ker([p_j(M)]^{\alpha_j}), such that all \mathcal{A}_i are M-invariant, and the minimal polynomial of the operator induced on \mathcal{A}_i by M is (p_i(\cdot))^{\alpha_i}.

3. Infinitely Long Invariant Subspace Trails for P-SPN Schemes (Without Active S-Boxes)

Focusing on P-SPN schemes which use the same linear layer in each round, this section studies the properties that the matrix defining the linear layer must satisfy in order to prevent infinitely long invariant subspace trails without active S-boxes.

3.1 Preliminary Results

Definition 11

Consider a P-SPN scheme over \mathbb{F}^t with 1 \leq s < t S-boxes. Let \mathcal{S}^{(i)} be defined as \mathbb{F}^t if i = 0, and \{ v \in \mathbb{F}^t \mid (M^j \cdot v)[1, \ldots, s] = 0, \; 0 \leq j < i \} otherwise.

Lemma 1

For each i \geq 1, \mathcal{S}^{(i+1)} = \mathcal{S}^{(i)} \cap (M^{-1} \cdot \mathcal{S}^{(i)}) \subseteq \mathcal{S}^{(i)}, where t - i \cdot s \leq \dim(\mathcal{S}^{(i)}) \leq t.

Lemma 2

Let \mathfrak{R} \geq \lfloor (t-s)/s \rfloor be such that \dim(\mathcal{S}^{(\mathfrak{R})}) \geq 1 and \dim(\mathcal{S}^{(\mathfrak{R}+1)}) = 0. For each r \leq \mathfrak{R}, (\mathcal{S}^{(r)}, M \cdot \mathcal{S}^{(r)}, \ldots, M^{r-1} \cdot \mathcal{S}^{(r)}) is a subspace trail for the first r rounds without active S-boxes.

3.2 Infinitely Long Invariant Subspace Trails via Eigenspaces of M

Proposition 3

Let \lambda_1, \ldots, \lambda_\tau be the eigenvalues of M and \mathcal{P}_1, \ldots, \mathcal{P}_\tau the corresponding eigenspaces. Let \mathcal{I} = \langle \mathcal{P}_1 \cap \langle e_{s+1}, \ldots, e_t \rangle, \ldots, \mathcal{P}_\tau \cap \langle e_{s+1}, \ldots, e_t \rangle \rangle. If 1 \leq \dim(\mathcal{I}) < t, then \mathcal{I} generates an infinitely long invariant subspace trail without active S-boxes.

3.3 Necessary and Sufficient Condition

Theorem 2

A subspace \mathcal{I} with 1 \leq \dim(\mathcal{I}) < t generates an infinitely long invariant subspace trail without active S-boxes if and only if \mathcal{I} \subseteq \mathcal{S}^{(1)} and \mathcal{I} = M \cdot \mathcal{I}.

Theorem 3

Let \{\mathcal{A}_1, \ldots, \mathcal{A}_m\} be the primary decomposition of \mathbb{F}^t w.r.t. M, and \mathcal{X}_i := \mathcal{A}_i \cap \langle e_{s+1}, \ldots, e_t \rangle. Then \mathcal{I} generates such a trail iff \mathcal{I} = \langle \mathcal{P}_1, \ldots, \mathcal{P}_m \rangle where each \mathcal{P}_i \subseteq \mathcal{X}_i is M-invariant.

Proposition 4

Define \mathcal{X}_i^{(j)} = \mathcal{X}_i^{(j-1)} \cap (M \cdot \mathcal{X}_i^{(j-1)}). The biggest M-invariant subspace \mathcal{P}_i of \mathcal{X}_i satisfying Theorem 3 equals \mathcal{X}_i^{(l_i)} where l_i is the smallest integer with \mathcal{X}_i^{(l_i)} = \mathcal{X}_i^{(l_i+1)}.

Corollary 1

The trail from Proposition 3 satisfies Theorem 3. The two results are equivalent if the matrix is diagonalizable.

4. Iterative Subspace Trails Without Active S-Boxes

Proposition 5

\mathcal{I} generates an infinitely long iterative subspace trail of period l \geq 2 without active S-boxes iff \mathcal{I} \subseteq \mathcal{S}^{(l)} and \mathcal{I} = M^l \cdot \mathcal{I}.

Proposition 6

Let \{\mathcal{A}_i^{(l)}\} be the primary decomposition w.r.t. M^l. Then \mathcal{I} generates such a trail iff \mathcal{I} = \langle \mathcal{P}_1, \ldots, \mathcal{P}_m \rangle where \mathcal{P}_i \subseteq \mathcal{A}_i^{(l)} \cap \mathcal{S}^{(l)} is M^l-invariant.

Proposition 7

An infinitely long iterative subspace trail without active S-boxes can only exist if there exists an infinitely long invariant subspace trail without active S-boxes.

4.1 Linear Layers with Low Multiplicative Order

Definition 12 (Multiplicative Order)

M has multiplicative order l \geq 1 if l is the smallest positive integer such that M^l = \mu \cdot I for some \mu \neq 0.

Proposition 8

If the multiplicative order of M is l with 2 \leq l \leq \mathfrak{R}, then \mathcal{S}^{(l)} generates an infinitely long iterative subspace trail of period l.

Cauchy Matrices in [GKR+21]. The Cauchy matrix proposed for Starkad/Poseidon over \mathbb{F}_{2^n} with t = 2^\tau has multiplicative order 2, enabling iterative trails as shown in [KR21, BCD+20].

4.2 Linear Layers with Low-Degree Minimal Polynomials

Proposition 9

Let \phi be the minimal polynomial of M of degree l with 2 \leq l \leq \mathfrak{R}. If \phi has only monomials whose exponents are multiples of h (a divisor of l), then \mathcal{I} = \langle \mathcal{S}^{(l)}, M^h \cdot \mathcal{S}^{(l)}, \ldots, M^{l-h} \cdot \mathcal{S}^{(l)} \rangle generates an infinitely long iterative trail of period h without active S-boxes (if 1 \leq \dim(\mathcal{I}) < t).

Lemma 3

Let \mathcal{P}_1^{(l)}, \ldots, \mathcal{P}_\tau^{(l)} be eigenspaces of M^l. The subspace \mathcal{I} := \langle \mathcal{S}^{(l)} \cap \mathcal{P}_1^{(l)}, \ldots, \mathcal{S}^{(l)} \cap \mathcal{P}_\tau^{(l)} \rangle generates an infinitely long iterative subspace trail of period l.

5. Practical Tests (Without Active S-Boxes)

5.1 Algorithm for Detecting Weak Matrices

Algorithm 1 uses Theorem 3 and Proposition 4. First, the full space is decomposed into M-invariant subspaces via Theorem 1. Then intersection with identity positions is taken: \mathcal{X}_i^{(0)} = \mathcal{A}_i \cap \langle e_{s+1}, \ldots, e_t \rangle. Proposition 4 is applied iteratively until the dimension stabilizes or reaches zero. The matrix is vulnerable if \dim(\mathcal{I}) > 0. Computational cost is \mathcal{O}(t^3).

5.2 Percentage of Weak Linear Layers

With a sample size of 100,000, focusing on s = 1, both random invertible and random Cauchy matrices were tested over prime and binary fields.

Table 1. Percentage of vulnerable matrices (Algorithm 1) over prime fields \mathbb{F}_p.

\lceil\log_2(p)\rceil / t 8/3 4/4 6/4 16/4 8/8 12/8 16/8 8/12
Random Inv. 0.46 8.94 2.06 <0.01 0.51 0.03 <0.01 0.50
MDS Cauchy 0.49 6.12 2.03 <0.01 0.49 0.03 <0.01 0.52

Increasing p (or n) tends to produce more secure matrices. Even for small fields, a secure matrix can easily be found by testing a small number of candidates.

6. Infinitely Long Subspace Trails for P-SPN Schemes (Active S-Boxes)

Assumption on the S-Box. From now on, only S-boxes without any nontrivial linear structures are considered. That is, it is not possible to find nontrivial subspaces \mathcal{U}, \mathcal{V} \subset \mathbb{F} such that for each u there exists v with S(\mathcal{U} + u) = \mathcal{V} + v. Both the AES S-box and the cube map x \mapsto x^3 satisfy this.

6.1 Preliminary Results: Subspace Trails & Truncated Differentials

Proposition 10

Let \mathfrak{R} < \infty. There exists a subspace trail with probability 1 on at least \mathfrak{R} + \lfloor (t-s)/s \rfloor rounds, defined by (\mathcal{S}^{(\mathfrak{R})}, M \cdot \mathcal{S}^{(\mathfrak{R})}, \ldots, M^{\mathfrak{R}-1} \cdot \mathcal{S}^{(\mathfrak{R})}, \mathcal{A}^{(1)}, \ldots), where \mathcal{A}^{(i)} := \langle M(e_1), \ldots, M(e_s), M \cdot \mathcal{A}^{(i-1)} \rangle.

6.2 Infinitely Long Invariant Subspace Trails with Active S-Boxes via Eigenspaces of M

Definition 13 (I-compatible Subspace)

Let I \subseteq \{1, \ldots, s\}. A subspace \mathcal{V} \subseteq \mathbb{F}^t is I-compatible if: when I = \emptyset, \mathcal{V} \subseteq \langle e_{s+1}, \ldots, e_t \rangle; when I = \{\iota_1, \ldots, \iota_{|I|}\}, then (1) \mathcal{V} \subseteq \langle e_{\iota_1}, \ldots, e_{\iota_{|I|}}, e_{s+1}, \ldots, e_t \rangle and (2) \langle e_{\iota_1}, \ldots, e_{\iota_{|I|}} \rangle \subseteq \mathcal{V}.

Proposition 11

Let \mathcal{P}_1, \ldots, \mathcal{P}_\tau be eigenspaces of M. Let \mathcal{I} = \langle \mathcal{P}'_1, \ldots, \mathcal{P}'_\tau \rangle where each \mathcal{P}'_h is a subspace of \mathcal{P}_h. If 1 \leq \dim(\mathcal{I}) < t and \mathcal{I} is I-compatible, then \mathcal{I} generates an infinitely long invariant subspace trail with active S-boxes.

6.3 Necessary and Sufficient Condition (Active S-boxes)

Theorem 4

Assume the S-box has no nontrivial linear structure. Let I \subseteq \{1, \ldots, s\}. A subspace \mathcal{I} with 1 \leq \dim(\mathcal{I}) < t generates an infinitely long invariant subspace trail (with active S-boxes if |I| \geq 1) if and only if \mathcal{I} is both M-invariant and I-compatible.

Theorem 5

Let \{\mathcal{A}_1, \ldots, \mathcal{A}_m\} be the primary decomposition w.r.t. M. \mathcal{I} generates an infinitely long invariant subspace trail with active S-boxes in positions I iff \mathcal{I} = \langle \mathcal{P}_1, \ldots, \mathcal{P}_m \rangle where each \mathcal{P}_i \subseteq \mathcal{A}_i \cap \langle e_{\iota_1}, \ldots, e_{\iota_{|I|}}, e_{s+1}, \ldots, e_t \rangle is M-invariant, and \mathcal{I} is I-compatible.

Corollary 3

If there exists I \subseteq \{1, \ldots, s\} such that a subspace \mathcal{A}_i from the primary decomposition is I-compatible, then \mathcal{A}_i generates an infinitely long invariant subspace trail with active S-boxes.

6.4 Infinitely Long Iterative Subspace Trails with Active S-Boxes

Theorem 6

Assume the S-box has no nontrivial linear structure. Let l \geq 1 be the period. For each j \in \{1, \ldots, l\}, let I_j \subseteq \{1, \ldots, s\} be the active S-box positions. A subspace \mathcal{I} generates an infinitely long iterative subspace trail of period l iff (1) M^j \cdot \mathcal{I} is I_j-compatible for j \in \{0, \ldots, l-1\}, and (2) \mathcal{I} is M^l-invariant.

Theorem 7

Let \{\mathcal{A}_i^{(l)}\} be the primary decomposition w.r.t. M^l. \mathcal{I} generates an infinitely long iterative subspace trail of period l with active S-boxes in positions I_j iff \mathcal{I} = \langle \mathcal{P}_1, \ldots, \mathcal{P}_m \rangle where each \mathcal{P}_i is M^l-invariant, and M^j \cdot \mathcal{I} is I_j-compatible for each j.

About Iterative Subspace Trails with Active S-Boxes. There exist P-SPN schemes with iterative subspace trails with active S-boxes but no invariant trails. For example, the 3 \times 3 matrix

M = \begin{pmatrix} 0 & 1 & -1 \\ 1 & -2 & 1 \\ 1 & -4 & 2 \end{pmatrix}

over \mathbb{F}_p^3 with s = 1 admits the iterative trail (\langle (1,0,0)^T \rangle, \langle (0,1,1)^T \rangle, \langle (0,1,2)^T \rangle) of period 3 with active S-boxes. Since \dim(\langle \mathcal{V}_0, \mathcal{V}_1, \mathcal{V}_2 \rangle) = 3, no invariant subspace trail can be set up.

7. Practical Tests (Active S-Boxes)

This section proposes two algorithms: one for infinitely long invariant subspace trails with active S-boxes, and one for iterative trails. Several matrices are tested over \mathbb{F}_p and \mathbb{F}_{2^n}.

7.1 Related Strategies in the Literature

The algorithms are based on the approach from [LMR15]. Given an SPN-like permutation, the goal is to find a subspace \mathcal{U} and offset u that is invariant under the keyless round function. The approach guesses a one-dimensional subspace and increases the space by computing \mathcal{A}_{i+1} = \langle R(\mathcal{A}_i + u) - v, \mathcal{A}_i \rangle until stabilization.

7.2 Algorithms for Detecting Weak Matrices

Algorithm 2 (invariant trails with active S-boxes): For each non-empty subset I_s \subseteq \{1, \ldots, s\}, start with the subspace generated by the unit vectors at active S-box positions. Keep including M^j \cdot e_i to the space until stabilization. Runtime is \mathcal{O}(2^s \cdot s \cdot t).

Algorithm 3 (iterative trails with active S-boxes): Replaces the single set I_s by l potentially different sets I_1, \ldots, I_l. Total runtime is \mathcal{O}(ls(2^s t + l)).

7.3 Percentage of Weak Linear Layers

Results across Algorithms 1, 2, and 3 show that the vulnerability percentages are generally small. A similar amount of matrices is vulnerable w.r.t. Algorithm 2 as w.r.t. Algorithm 1. Matrices vulnerable only to Algorithm 3 (but not 1 or 2) are extremely rare (< 0.01% in nearly all cases).

Table 3. Percentage of vulnerable matrices (Algorithms 1, 2, 3) over prime fields \mathbb{F}_p. "Vx" = vulnerable w.r.t. Algorithm x, "Sx" = secure w.r.t. Algorithm x.

\lceil\log_2(p)\rceil / t 8/3 4/4 6/4 16/4 8/8 12/8 16/8 8/12
V2 (Rand.) 0.48 8.94 2.02 <0.01 0.47 0.03 <0.01 0.51
V2 ∧ S1 0.48 7.46 1.94 <0.01 0.46 0.03 <0.01 0.51
V2 ∨ V1 0.94 16.41 4.00 <0.01 0.97 0.06 <0.01 1.01
V3 ∧ S2 <0.01 0.01 <0.01 <0.01 <0.01 <0.01 <0.01 <0.01

8. Security Against Infinitely Long Subspace Trails

This section presents a sufficient condition on the matrix defining the linear layer that -- if satisfied -- ensures that no infinitely long (invariant/iterative) subspace trail (with/without active S-boxes) exists. The condition involves only the minimal polynomial of the matrix and is independent of the number of S-boxes per round.

8.1 Sufficient Condition for Preventing Infinitely Long Subspace Trails

Proposition 12

Let \phi be the minimal polynomial of an invertible matrix M. Assume \phi is irreducible and let v \in \mathbb{F}^t \setminus \{0\}. For each monic polynomial \phi' such that \phi'(M) \cdot v = 0 and \deg(\phi') \leq \deg(\phi), it follows that \phi' = \phi.

Proposition 13

Assume the S-box has no nontrivial linear structure. If the minimal polynomial \phi of M has maximum degree t and is irreducible, there is no infinitely long invariant subspace trail with or without active S-boxes.

Theorem 8

If all the minimal polynomials of M, M^2, \ldots, M^l are of maximum degree t and irreducible, then there is no infinitely long subspace trail with or without active S-boxes of period less than or equal to l.

Discussion. Given an irreducible polynomial \phi \in \mathbb{F}[x] of degree t, all matrices similar to the companion matrix of \phi satisfy Proposition 13. The percentage of Cauchy MDS matrices satisfying this condition ranges from approximately 8% (for t = 12) to over 33% (for t = 3). Since this is only a sufficient condition, matrices that do not satisfy it may still be secure.

8.2 Open Problems

  • Given a matrix for which no infinitely long subspace trail exists, how many rounds are needed to activate at least one S-box? Practical tests suggest t + \varepsilon rounds for \varepsilon \in \{0, 1\}.
  • If the S-box has a nontrivial linear structure, the results for active S-boxes may be extendable.
  • In the binary case, extending results to linear layers defined via linearized polynomials.

Appendix A. Truncated Differentials and Subspace Trails

Differential attacks [BS91] exploit pairs of inputs with certain differences yielding other differences in the outputs with a non-uniform probability distribution. Truncated differential attacks [Knu94] predict only part of the difference. Using subspace terminology: given pairs of inputs in the same coset of \mathcal{X}, one considers the probability that outputs belong to the same coset of \mathcal{Y}.

The proof of Proposition 10 shows that the subspace trail over the first \mathfrak{R} rounds (no active S-boxes) can be extended by increasing the subspace dimension: at each subsequent round, the S-box outputs are absorbed into the subspace, adding s dimensions per round. The trail persists for at least \mathfrak{R} + \lfloor (t-s)/s \rfloor rounds total.

Appendix B. Infinitely Long Iterative Subspace Trails with Active S-Boxes

Algorithm 3 searches for iterative trails of maximum period l = 2t. For each period r from 2 to l, and for each non-empty subset of S-box positions, Algorithm 2 is applied to M^r. If a meaningful subspace \mathcal{I} is found (i.e., not invariant under M itself), the algorithm checks that M^j \cdot \mathcal{I} is compatible with valid S-box positions at each step. Total runtime is \mathcal{O}(ls(2^s t + l)).

Appendix C. Results Using the Tool and More Examples

C.1 Starkad and Poseidon Matrices. The Cauchy matrices from the Starkad and Poseidon specifications were tested. The Starkad matrix M' over \mathbb{F}_{2^n} and the Poseidon matrix M'' over \mathbb{F}_p are defined as M'_{i,j} = 1/(x_i \oplus y_j) and M''_{i,j} = 1/(x_i + y_j) where x_i = i, y_i = i + t.

Table 6. Vulnerable matrices (Algorithm 1) for Starkad and Poseidon specifications.

Spec t=3 t=4 t=8 t=12
Poseidon (\mathbb{F}_p) No No No No
Starkad (\mathbb{F}_{2^n}) No Yes Yes Yes

These results confirm findings from [KR21, BCD+20]. The fix proposed in [KR21] (changing starting sequences for Cauchy generation) produces matrices with no infinitely long subspace trails.

C.2 Zorro Matrix. The Zorro matrix (a P-SPN over (\mathbb{F}_{2^8})^{16} with s = 4) was also evaluated. No infinitely long (iterative or invariant) subspace trail was found, neither with nor without active S-boxes. The known attacks on Zorro exploit differentials with higher-than-expected probability, not infinitely long subspace trails.

References

  • [AAB+20] Aly, Ashur, Ben-Sasson, Dhooghe, Szepieniec. Design of Symmetric-Key Primitives for Advanced Cryptographic Protocols. IACR Trans. Symmetric Cryptol. 2020(3):1-45.
  • [AÅBL12] Abdelraheem, Ågren, Beelen, Leander. On the Distribution of Linear Biases: Three Instructive Examples. CRYPTO 2012, LNCS 7417, pp. 50-67.
  • [AD18] Ashur, Dhooghe. MARVELlous: a STARK-Friendly Family of Cryptographic Primitives. ePrint 2018/1098.
  • [AGP+19] Albrecht, Grassi, Perrin, Ramacher, Rechberger, Rotaru, Roy, Schofnegger. Feistel Structures for MPC, and More. ESORICS 2019, LNCS 11736, pp. 151-171.
  • [AGR+16] Albrecht, Grassi, Rechberger, Roy, Tiessen. MiMC: Efficient Encryption and Cryptographic Hashing with Minimal Multiplicative Complexity. ASIACRYPT 2016, LNCS 10031, pp. 191-219.
  • [ARS+15] Albrecht, Rechberger, Schneider, Tiessen, Zohner. Ciphers for MPC and FHE. EUROCRYPT 2015, LNCS 9056, pp. 430-454.
  • [BBI+15] Banik et al. Midori: A Block Cipher for Low Energy. ASIACRYPT 2015, LNCS 9453, pp. 411-436.
  • [BCD+20] Beyne, Canteaut, Dinur, Eichlseder, Leander, Leurent, Naya-Plasencia, Perrin, Sasaki, Todo, Wiemer. Out of Oddity -- New Cryptanalytic Techniques Against Symmetric Primitives Optimized for Integrity Proof Systems. CRYPTO 2020, LNCS 12172, pp. 299-328.
  • [BCLR17] Beierle, Canteaut, Leander, Rotella. Proving Resistance Against Invariant Attacks. CRYPTO 2017, LNCS 10402, pp. 647-678.
  • [BDD+15] Bar-On, Dinur, Dunkelman, Lallemand, Keller, Tsaban. Cryptanalysis of SP Networks with Partial Non-Linear Layers. EUROCRYPT 2015, LNCS 9056, pp. 315-342.
  • [Bey18] Beyne. Block Cipher Invariants as Eigenvectors of Correlation Matrices. ASIACRYPT 2018, LNCS 11272, pp. 3-31.
  • [BS91] Biham, Shamir. Differential Cryptanalysis of DES-like Cryptosystems. J. Cryptology 4(1):3-72.
  • [CCF+18] Canteaut, Carpov, Fontaine, Lepoint, Naya-Plasencia, Paillier, Sirdey. Stream Ciphers: A Practical Solution for Efficient Homomorphic-Ciphertext Compression. J. Cryptology 31(3):885-916.
  • [DEG+18] Dobraunig, Eichlseder, Grassi, Lallemand, Leander, List, Mendel, Rechberger. Rasta: A Cipher with Low ANDdepth and Few ANDs per Bit. CRYPTO 2018, LNCS 10991, pp. 662-692.
  • [DGGK19] Dobraunig, Grassi, Guinet, Kuijsters. Ciminion: Symmetric Encryption Based on Toffoli-Gates over Large Finite Fields. EUROCRYPT 2021.
  • [DLMW15] Dinur, Liu, Meier, Wang. Optimized Interpolation Attacks on LowMC. ASIACRYPT 2015, LNCS 9453, pp. 535-560.
  • [DPAR00] Daemen, Peeters, Van Assche, Rijmen. Nessie Proposal: NOEKEON. 2000.
  • [DR02] Daemen, Rijmen. AES and the Wide Trail Design Strategy. EUROCRYPT 2002, LNCS 2332, pp. 108-109.
  • [GGNPS13] Gerard, Grosso, Naya-Plasencia, Standaert. Block Ciphers That Are Easier to Mask. CHES 2013, LNCS 8086, pp. 383-399.
  • [GKR+21] Grassi, Khovratovich, Rechberger, Roy, Schofnegger. Poseidon: A New Hash Function for Zero-Knowledge Proof Systems. USENIX Security 2021.
  • [GLR+20a] Grassi, Leander, Rechberger, Tezcan, Wiemer. Weak-Key Distinguishers for AES. SAC 2020.
  • [GLR+20b] Grassi, Luftenegger, Rechberger, Rotaru, Schofnegger. On a Generalization of Substitution-Permutation Networks: The HADES Design Strategy. EUROCRYPT 2020, LNCS 12106, pp. 674-704.
  • [GLSV14] Grosso, Leurent, Standaert, Varici. LS-Designs: Bitslice Encryption for Efficient Masked Software Implementations. FSE 2014, LNCS 8540.
  • [GRR16a] Grassi, Rechberger, Ronjom. Subspace Trail Cryptanalysis and its Applications to AES. IACR Trans. Symmetric Cryptol. 2016(2):192-225.
  • [GRR17] Grassi, Rechberger, Ronjom. A new structural-differential property of 5-round AES. EUROCRYPT 2017, LNCS 10211, pp. 289-317.
  • [Hog16] Hogben. Handbook of Linear Algebra. CRC Press, 2nd ed.
  • [Kai08] Kaiser. Advanced Linear Algebra. 2008.
  • [Knu94] Knudsen. Truncated and Higher Order Differentials. FSE 1994, LNCS 1008, pp. 196-211.
  • [KR21] Keller, Rosemarin. Mind the Middle Layer: The HADES Design Strategy Revisited. EUROCRYPT 2021.
  • [LAAZ11] Leander, Abdelraheem, AlKhzaimi, Zenner. A Cryptanalysis of PRINTcipher: The Invariant Subspace Attack. CRYPTO 2011, LNCS 6841, pp. 206-221.
  • [LMR15] Leander, Minaud, Ronjom. A Generic Approach to Invariant Subspace Attacks. EUROCRYPT 2015, LNCS 9056, pp. 254-283.
  • [LTW18] Leander, Tezcan, Wiemer. Searching for Subspace Trails and Truncated Differentials. IACR Trans. Symmetric Cryptol. 2018(1):74-100.
  • [Mat93] Matsui. Linear Cryptanalysis Method for DES Cipher. EUROCRYPT 1993, LNCS 765, pp. 386-397.
  • [MJSC16] Meaux, Journault, Standaert, Carlet. Towards Stream Ciphers for Efficient FHE with Low-Noise Ciphertexts. EUROCRYPT 2016, LNCS 9665.
  • [PRC12] Piret, Roche, Carlet. PICARO -- A Block Cipher Allowing Efficient Higher-Order Side-Channel Resistance. ACNS 2012.
  • [PW20] Peyrin, Wang. The MALICIOUS Framework: Embedding Backdoors into Tweakable Block Ciphers. CRYPTO 2020.
  • [Sto98] Storjohann. An O(n^3) algorithm for the Frobenius normal form. ISSAC 1998, pp. 101-105.
  • [TLS16] Todo, Leander, Sasaki. Nonlinear Invariant Attack. ASIACRYPT 2016, LNCS 10032, pp. 3-33.
  • [WWGY14] Wang, Wu, Guo, Yu. Differential Cryptanalysis and Linear Distinguisher of Full-Round Zorro. ACNS 2014, LNCS 8479, pp. 308-323.
  • [YMT97] Youssef, Mister, Tavares. On the Design of Linear Transformations for Substitution Permutation Encryption Networks. SAC 1996, pp. 40-48.

History

  • 2026-02-17Add disclaimer: content not author-approved, eprint is authoritative6638546
  • 2026-02-16Add CONVERTED_DATE to existing 47 paper pages7191c14
  • 2026-02-16Add crawler metadata to all 47 paper pagesc6638f2
  • 2026-02-14Fix math rendering: add display math support, remove sub/sup tags0ed1494
  • 2026-02-14Replace HTML sub/sup with KaTeX math environmentsa020da2
  • 2026-02-13Add 10 new paper pages and update papers index0debc7b