Manuscript Offprint
arXiv:2610.30383Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Chakshu Gupta
College of Computing, Georgia Institute of Technology, United States
Abstract. NIST standardised ML-KEM and ML-DSA in 2024 for post-quantum key establishment and digital signatures. Both compute forward number-theoretic transforms (NTTs) on secret polynomials. Published attacks zero every fixed multiplier, or twiddle, during Kyber key generation with a single fault, or individual twiddles in one Dilithium signing variant; countermeasures detect or mask these faults. Nonzero replacements preserve invertibility, but the uncompressed correct-minus-faulted transform difference can still expose input information. This paper characterises the linear map from a secret polynomial to this difference under arbitrary static twiddle replacements, including bit-flips. For one fault, rank equals the number of butterflies sharing its twiddle, halving by layer from 128 to 2 for ML-KEM and to 1 for ML-DSA. Known positions, replacement values and the difference determine that many independent linear combinations of input coefficients. With one fault per layer, all but the constant and linear coefficients for ML-KEM, or the constant for ML-DSA, are determined; Lean 4 certifies this rank-and-kernel result. Those coefficients cancel for every fault set and choice of replacement values. NIST permits seed storage, motivating comparison of a known correct key with a released faulty key from the same seed. If only one ML-KEM secret-polynomial NTT is faulted, the key difference is a known matrix column times the transform difference; an invertible column entry reconstructs the latter. For ML-DSA, neither reconstruction nor the number of secret-polynomial candidates from compressed key differences is established. The per-layer ranks give a closed-form measure of raw exposure for countermeasure design.
Keywords: ML-KEM · ML-DSA · NTT · fault attack · leakage bound · formal verification · post-quantum cryptography
1 Introduction
NIST standardized ML-KEM for key establishment and ML-DSA for digital signatures in 2024 [Nat24b, Nat24a]. Fault attacks on these schemes and their predecessors, Kyber and Dilithium, derive secret-dependent equations and inequalities from faulty public keys, signatures and decapsulation outcomes [VRBW25, KPLG24, Del22]. Both use forward number-theoretic transforms on secret polynomials during key generation; ML-DSA also transforms temporary signing masks.
In deterministic Dilithium, faulting the temporary-mask transform can change the challenge without changing the response mask. Subtracting responses from signatures with the same mask and key gives the challenge difference times the signing secret vector [GBP18]. Twiddle faults target fixed nonzero public multipliers, each shared by a group of disjoint two-input butterflies. Zeroing all twiddles in Kyber recovers the restricted fault-generated secret, not the original sampled polynomials [RYB 23]. In a Dilithium variant with
E-mail: cgupta65@gatech.edu (Chakshu Gupta)
This work is licensed under a “CC BY 4.0” license. Date of this document: 2026-10-23.
CC BY
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
NTT-domain response addition, global mask-transform twiddle zeroing exposes challenge-times-secret coefficients . A later attack on that variant zeroes only the first-layer twiddle of one mask-polynomial transform, removing half its response contributions and exposing the corresponding challenge-times-secret coefficients .
The cited zeroing attacks do not give a general rank-and-kernel law for the correct-minus-faulted transform difference. Nonzero replacements leave the faulted transform invertible, so its rank does not quantify this difference. This paper studies the difference map under fixed changed field values, zero or nonzero, at every use of selected twiddles during one call. Partial-use faults are excluded and physical delivery is not demonstrated. Known positions, values and a transform difference supply linear constraints on the original input, not signing-secret recovery or a signing-query count.
For one replacement, the rank equals the number of butterflies sharing its twiddle and halves by layer. One replacement per layer attains ranks 254 for ML-KEM and 255 for ML-DSA on 256-coefficient inputs. For one replacement per layer, a known map and difference determine all coefficients except the constant and linear coefficients in ML-KEM, or the constant in ML-DSA. These contributions never enter twiddle-multiplied inputs, so they cancel for every fault set and the attained ranks are universal ceilings. Both exact laws are value-independent; for arbitrary sets, the sum of singleton ranks is an upper bound and the actual rank can depend on replacement values.
The public-key applications compare a known correct key with a released faulty key from the same seed. Only one secret-polynomial forward NTT call is faulted; other computations are unchanged, and suppressing release blocks the comparison. For ML-KEM, the decoded key difference is a known matrix column times the transform difference. An invertible entry reconstructs it. With known faults, one replacement per layer gives exact small-coefficient candidate counts for one original polynomial, not the full decapsulation key.
ML-DSA instead compresses its public key with Power2Round [Nat24a]. Under the same observation regime, for a fixed nonzero transform difference and a uniformly sampled public matrix, the probability of identical compressed keys is below for every standardized parameter set. This is non-erasure, not reconstruction of the transform difference or an exact candidate count from compressed keys.
2.1 Observation Regime
The observer is assumed to know a public key from an unfaulted key-generation run and to obtain a released faulty public key from another run with the same seed material and parameter set. FIPS 203 and FIPS 204 permit seed storage for later expansion [Nat24b, Sec. 3.3], [Nat24a, Sec. 3.6.3]. The observer need not know the seed; these provisions do not establish faulty-key release.
Replacements are confined to one forward NTT call on one polynomial of the ML-KEM secret vector or the ML-DSA secret vector , not the temporary mask used in signing. Sampling and public-matrix generation are unchanged; all other operations execute without faults. Aborting before release or suppressing the faulty public key blocks this comparison. The model concerns two key-generation runs, not an attack using a single faulty public key.
2.2 Forward NTT
Both schemes use with , where for ML-KEM and for ML-DSA [Nat24b, Nat24a]. Coefficient vectors form with standard basis . A butterfly with nonzero original twiddle maps field inputs to
For fixed inputs, replacing by gives the correct-minus-faulted difference .
Each twiddle index labels one group of butterflies on disjoint coordinate pairs. The butterflies in group share the original twiddle value . The layers are numbered . Layer contains groups, each with butterflies. Numbering groups consecutively through the layers assigns layer the indices . Thus the full index set is , and is the layer of twiddle .
ML-KEM's incomplete transform has layers and stops with two butterflies per group. ML-DSA's complete transform includes a final layer pairing adjacent coordinates, giving and one butterfly per group in that layer.
Figure 1 illustrates these layer patterns at n = 8, with the layer-0 twiddle replaced.
input

Figure 1: Eight-input forward NTT network with the layer-0 twiddle replaced by . Omitting layer 2 gives the incomplete shape, whose outputs are taken after layer 1.
Lemma 1 (Butterfly Invertibility). For odd and , the butterfly is invertible. Every suffix of the original forward NTT consisting of whole butterfly operations is invertible.
Proof. The butterfly matrix has nonzero determinant,
since is odd and . The full-state operation applies this matrix to its coordinate pair and the identity to all other coordinates. Original twiddles are nonzero, so every butterfly of the suffix is invertible on the full state, and so is their composition.
2.3 Replacement Model
Let be the set of replaced twiddle indices. During one forward NTT call, the faulted transform uses a fixed field value at every use of for each , leaving other twiddles unchanged. Replacement values may be zero or nonzero.
Transient load faults affecting only some uses of an indexed twiddle are outside this model. A twiddle-value bit flip is included only if the changed field value reaches every use
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
of the affected twiddle. The model does not assert that arbitrary positions and replacement values can be realized physically, and it does not assume control over the faults.
The correct transform NTT and the faulted transform are linear maps on because their butterflies have fixed multipliers. Their correct-minus-faulted difference is
The subscript records only the positions; the replacement values also specify the map and may affect its rank.
The rank of counts independent linear combinations of input coefficients in the transform difference. When interpreting a known as linear constraints on , the observer is assumed here to know the fault positions and replacement values. These determine the map's matrix, while the known difference gives the constraint values.
2.4 Public-Key Observables
The ML-KEM secret vector s has secret-polynomial entries with coefficients in , where for ML-KEM-512 and for ML-KEM-768 and ML-KEM-1024 [Nat24b, Table 2]. The sampled noise vector is e. Hats denote NTT-domain representations; primes denote faulted-run quantities. Products use ML-KEM's NTT-domain ring multiplication. The public key losslessly encodes and the seed defining the public matrix [Nat24b, Alg. 13]. If is the affected secret polynomial, with module index known to the observer, the unchanged matrix, noise and other secret components give
An entry of invertible in the NTT-domain ring suffices to reconstruct by multiplying the corresponding row difference by its inverse. Nonzero alone does not guarantee invertibility. Given the map and , the candidate bounds of Section 5 concern coefficient-bounded polynomials in , including , not the full decapsulation key. No further public-key constraints are used here to filter these candidates.
For ML-DSA, the secret vectors and have coefficients in , where for ML-DSA-44 and ML-DSA-87 and for ML-DSA-65 [Nat24a, Table 1]. With coordinatewise multiplication in the NTT domain, key generation forms the uncompressed vector [Nat24a, Alg. 6]. If is the affected secret polynomial, the same unchanged-computation assumptions give
The public key encodes the matrix seed and the Power2Round high parts , so the observable is , not the uncompressed difference. Section 5 bounds the total-erasure probability for a fixed nonzero transform difference and an independent uniformly sampled public matrix, but establishes neither reconstruction nor the number of coefficient-bounded candidates from compressed keys.
3 Single-Fault Rank
A single replacement affects a group of disjoint butterflies. At the affected layer, each butterfly's output difference is a scalar multiple of determined by its second input. Invertible preceding layers let these inputs vary independently, and invertible following layers preserve the independent differences. The rank equals the number of affected butterflies, which halves at each successive layer.
For a replacement at twiddle index , the difference map is . The replacement has nonzero perturbation .
Theorem 1 (Single-fault rank). For every twiddle index and replacement value ,
Proof. Let be the composition of the unchanged layers before layer , and let be the composition after it. Let and be the correct and faulted maps of that layer. Subtracting from and using linearity gives . Extending an original butterfly and its inverse from Lemma 1 by the identity on all other coordinates gives inverse maps on the full state. Both and are compositions of such butterfly maps, so they are invertible and preserve rank in this composition.
At the faulted layer, each affected butterfly contributes . Since , varying its second input gives a one-dimensional image. The affected input and output pairs are disjoint, so these images form a direct sum. All other butterfly differences are zero. Therefore,
Zeroing and twiddle-value bit flips covered by the model obey the same formula. Layer 0 maximizes singleton rank at , giving that many independent linear constraints when the map and difference are known. The next question is whether one replacement per layer attains the sum of these ranks.
4 Saturating the Rank Bound
For one replacement per layer, the sum of the single-fault ranks bounds the combined rank. Saturation means attaining that bound. This section proves saturation and determines the kernel for this pattern, then bounds the rank for arbitrary fault sets. A general kernel inclusion supplies the coordinate spans used in both regimes.
At layer , each group acts on a block of consecutive coordinates whose first index is a multiple of . That index is the group start, and a coordinate's offset is its index minus the group start. For , each butterfly takes its first input at offset and its second input at offset . With twiddle , the butterfly writes and to those coordinates [Nat24b, Alg. 9]; [Nat24a, Alg. 41].
Lemma 2 (Universal Kernel Inclusion). For every fault set K and all replacement values allowed by the replacement model,
Proof. Use in ML-DSA and in ML-KEM. Initially the whole vector is one group starting at zero. Before layer 0 both computations give , so they agree and every nonzero entry has offset in the initial group.
Suppose that before layer they agree and every nonzero entry has offset in its group. Since in ML-DSA and in ML-KEM, the selected satisfies at every layer. Every second input is therefore zero. Each butterfly maps to for every original or replacement twiddle, so the computations produce the same vector. Each nonzero entry is copied to offset in each half-group. Whenever another layer follows, these half-groups are its groups, so the invariant persists. After the final layer, the transforms agree on , giving . Linearity gives the stated span inclusions.
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
4.1 One Fault per Layer
A one-per-layer pattern is a set in which is a twiddle index in layer for . Let be the original layer map and its version with replaced by . The transforms compose these layers in execution order,
Set . For , the hybrid transform uses the replaced maps through layer and the original maps thereafter. In particular, . Write for the change when layer is replaced. Telescoping these differences gives
For each layer , the hybrids and share the maps before and after that layer. With empty compositions interpreted as the identity, linearity gives
For replacement value , the single-fault difference map is composed with invertible original layers. Theorem 1 therefore gives rank . Composition and subadditivity give, without requiring invertible,
This is n - 2 for ML-KEM and n - 1 for ML-DSA.
To attain the bound, the next lemmas separate the term images and identify a layer-ordered family of basis inputs. The input construction is needed because every acts on the same input, so direct image sums and full term ranks alone do not imply rank additivity.
To locate the inverse-transformed images, number bits from 0 at the least significant bit. For layer , write , so . The group start is a multiple of , and first-input offsets are less than . Adding the pairing stride therefore changes only bit from 0 to 1. Define
Lemma 3 (Bit-Subspace Localization). For every layer ,
Proof. Extending an original butterfly and its inverse from Lemma 1 by the identity on the other coordinates gives inverse maps on the full state. Each original layer is a composition of these butterfly maps and is therefore invertible. Canceling in gives
The image of lies in the image of , even if is singular. On each affected butterfly, produces for some and is zero on other pairs. For field inputs and original nonzero twiddle , the inverse butterfly is
It sends to . The second coordinate has bit set, so sends the image of into .
Each remaining inverse layer with pairs indices differing only in bit . An inverse butterfly mixes only the two coordinates of its pair, which have the same bit . For an input in , both coordinates are zero when bit is 0, so the outputs are zero. Each remaining layer preserves , proving the containment.
The spaces overlap. Write , with . Bit-Subspace Localization places the earlier inverse-transformed images in and the current image in . The restricted quotient map
has kernel because zero class means membership in . Its injectivity therefore separates each image from its predecessors.
For a layer , write for an index whose high block occupies bit positions for . The middle bit is at position , and is the integer value of the low block. Vertical bars concatenate bit blocks from most to least significant. The space is spanned by the coordinate basis vectors with a set high bit. Its intersection with is therefore spanned by the vectors with . The remaining basis-vector classes form a coordinate basis of the quotient, indexed by
Let be the high block of the faulted group. For , define as the group's second-input vector at layer , with entry equal to . Recall .
Lemma 4 (Quotient Injection). For every layer , the map is injective and . For every input , the coordinate vector of in the basis is
Proof. Let and write for entry of . Canceling as in Bit-Subspace Localization gives
On the pair at indices and , the local difference produces , and it is zero on other pairs. The original inverse layer sends this to . The remaining inverse layers therefore act on one deposit at for each .
The remaining inverse layers pair indices that agree in the middle and low bits. For each , the fiber therefore evolves independently, with high bits processed in order when . Each inverse butterfly sends the twiddle-free half-sum to the output whose paired bit is 0. After inverse layers, each fiber coordinate with the processed bits zero is times the sum of the initial coordinates differing only in those bits. For this is the initial coordinate. For , the two
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
inputs to an output with the first processed bits zero have their first processed bits zero. Their initial index sets are disjoint because the newly paired bit is 0 in one and 1 in the other; together they form the indices differing only in the first processed bits. The half-sum divides their common factor by two, establishing the claim for . At , the all-zero high-block output is times the sum of all initial fiber coordinates. Only the deposit can be nonzero, giving
The quotient discards the coordinates with a nonzero high block, so these values give the asserted coordinate vector. The scalar is nonzero because is odd and both and the original twiddle are nonzero. For , choose with . The formula forces , so and . Thus is injective.
Image separation does not yet show that a term has full rank. The next lemma identifies basis inputs whose second-input values at the faulted group form an identity matrix.
Lemma 5 (Identity Submatrix). Fix a layer , with the high block of its faulted group. For every and ,
For all , the second-input entries at the faulted group satisfy
Proof. Write and for , so and . Prove the first formula by induction on . The prefix occupies the first high-bit positions, and the zero block occupies the remaining high-bit positions. For , the prefix is empty and the sum is .
For , the first bit of the zero block is at position . Every support index has value 0 in that bit and carries input value 1. Its butterfly partner has value 1 in that bit, so lies outside the support and carries input value 0. For either the original or replacement twiddle value , the butterfly sends to . These pairs are disjoint, so each new support entry is 1 and both values of bit occur; all other pairs have zero inputs and remain zero. The prefix gains one bit, the zero block loses one bit and the formula holds for .
At , the zero block is empty. For a row index in the stated range, exactly the summand with contributes at when , and none contributes otherwise. This gives the second formula.
Theorem 2 (Rank and Kernel). For every one-per-layer pattern , with in layer , original twiddles and replacements for ,
Proof. Lemma 2 places the stated coordinate span in ker . The remaining basis inputs give a layer-ordered family of independent outputs attaining the upper rank bound; rank-nullity then forces kernel equality.
Image Independence. By Lemma 3, the earlier inverse-transformed images lie in . Lemma 4 gives , so each inverse-transformed image meets the sum of its predecessors only at zero. They therefore sum directly. Applying the invertible correct NTT transfers this property to the images of . A zero sum of vectors, one from each image, has every term zero.
Per-Term Independence. By Lemma 5, the second-input vectors at the faulted group for , , are the standard basis vectors. The local difference scales each by to produce nonzero vectors with pairwise disjoint supports. The invertible preserves independence, so the vectors , , are linearly independent.
Block-Triangular Assembly. For and , Lemma 5 places the support of only at indices whose bit is 0. Its layer-r second inputs are zero, so . Factoring then gives . The telescope therefore reads
The set consists exactly of the indices with highest set bit , since it includes every low-block value with higher bits zero. The layer bits range over all positions except position 0 in ML-KEM and over every position in ML-DSA. Thus the sets are disjoint and partition in ML-KEM and in ML-DSA.
Consider a linear relation with coefficients ,
Substituting the telescope and grouping by image, Image Independence makes the terms in each Im sum to zero. Proceed in layer order . For there are no earlier inputs; for assume their coefficients are zero. Later inputs contribute zero in either case, leaving
Per-Term Independence forces the coefficients in to vanish. Induction therefore gives for every input in the partition, so the vectors are independent.
Their number gives rank at least in ML-KEM and in ML-DSA, so the upper bounds are attained. Rank-nullity gives kernel dimension 2 in ML-KEM and 1 in ML-DSA, so the kernel inclusions are equalities.
4.2 Leakage of an Arbitrary Fault Set
Single-fault rank determines the rank for one replacement, and Rank and Kernel determines it for exactly one replacement per layer. If every singleton replacement leaves the output of a given input unchanged, their joint application also leaves it unchanged. This kernel inclusion bounds the joint rank by the combined singleton row space.
Fix a total order of all groups that follows the layer order. Within each layer, different groups act on disjoint coordinates and their maps commute, so this order can be used in every run.
For a fault set , compare with the single-fault maps , , using the same replacement value in both maps. For a linear map , write rowsp for the row space of its matrix in the coordinate basis. Empty intersections of kernels mean and empty sums of row spaces mean .
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
Theorem 3 (Arbitrary-Set Rank Bound). For every fault set K and all replacement values allowed by the replacement model,
and
Proof. Equality of a singleton-fault output and the correct output forces equality immediately after that fault, since the remaining original transform is invertible. Applying this in execution order keeps the joint run equal to the correct run. Stacking the singleton maps then gives the rank bound.
Kernel Inclusion. If , then and both claims follow. Otherwise, list the replaced groups as in the fixed execution order. Let , so every singleton replacement preserves its output. The joint and correct runs agree before . Inductively, suppose they agree before ; the singleton run reaches this same input because its earlier operations are unfaulted. Let be the states after the original and replaced group, and the remaining original suffix. The singleton-output equality gives
Butterfly Invertibility makes invertible, so . The joint run uses the same replacement on the same input and also reaches . Its intervening unfaulted operations preserve agreement up to the next replaced group and, finally, the output. Thus , without using invertibility of a replaced butterfly.
Rank Bound. Let be the matrix obtained by stacking the coordinate matrices of the maps , , vertically. Its kernel is the intersection of their kernels, and its row space is the sum of their row spaces. The inclusion and rank-nullity give
Subadditivity of row-space dimension and Single-fault rank give
as required.
Corollary 1 (Combined Rank Ceilings). For every fault set K and all replacement values allowed by the replacement model,
The bound is attained for every singleton fault set and every one-per-layer pattern.
Proof. Universal Kernel Inclusion and rank-nullity give ceilings and . Taking their minimum with the sum bound from Arbitrary-Set Rank Bound proves the inequalities. Single-fault rank attains the singleton sum bound, which cannot exceed the universal ceiling. For one replacement per layer, the geometric sum
equals the ceiling attained by Rank and Kernel.
□
Remark 1 (Replacement Values and Tightness). The value-independent singleton and one-per-layer ranks need not extend to arbitrary sets. Exact finite-field calculations at , give rank 192 for replacements (1,1,1) in both schemes. Keeping but using in ML-KEM or 1600002 in ML-DSA gives rank 128. All four cases satisfy the model and have singleton row-space sum of dimension 192. The first cases attain that bound; the latter do not. In the latter cases the joint kernel has dimension 128 and the singleton-kernel intersection has dimension 64, so Arbitrary-Set Rank Bound gives
For one-per-layer patterns, Rank and Kernel attains the sum of singleton ranks. Arbitrary-Set Rank Bound therefore forces
5 Implications
A known map and raw difference give linear constraints for coefficient-bounded candidate counts. The ML-DSA total-erasure bound uses a separate probability model and does not reconstruct the raw difference from compressed keys.
With known maps and a joint transform difference, attaining the row-space bound means that the joint observation gives as many independent linear equations as all singleton observations together. One-per-layer patterns and two replacements within one layer attain it.
Corollary 2 (Same-layer additivity). For distinct twiddle indices in a common layer and replacement values and ,
Proof. As in the proof of Single-fault rank, factor the unchanged layers before and after as B and A. These full-state maps are invertible by Butterfly Invertibility. For the original and jointly replaced layer maps , linearity gives . Each of the affected butterflies contributes a nonzero multiple of as its second input b varies. Their input and output pairs are disjoint, so these images sum directly; every other difference is zero. Hence
Single-fault rank makes this the sum of singleton ranks. Theorem 3 sandwiches the singleton row-space dimension between the joint rank and that sum, proving equality. ☐
The per-layer leakage rate is the single-fault rank from Theorem 1. Given the map and raw difference, it counts independent linear constraints. The ML-KEM rates are (128, 64, 32, 16, 8, 4, 2); ML-DSA appends .
For ML-DSA, these raw rates must be distinguished from the compressed observable. Power2Round drops low-order bits per coefficient, leaving the published high-part vector [Nat24a, Alg. 35]. Write and .
Write for the affected secret polynomial in module slot and for the number of rows of . For each fixed choice of , its replacement values, , and the other
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
entries of , write and for the differences when slot contains a polynomial . For each row ,
where the product is coordinatewise in the complete NTT domain .
Lemma 6 (Power2Round containment). For ML-DSA, every fault set K and allowed replacement values give
Proof. If a polynomial lies in , then and . All remaining operations are unchanged, so . Deterministic Power2Round then gives .
By Lemma 6, forces total erasure . The probability bound below instead concerns . Equality of high parts imposes a necessary condition on raw differences. For , write for its integer representative in .
Lemma 7 (Rounding-bin necessary condition). For ML-DSA, if a polynomial has for a fault set and allowed replacement values, then
Proof. Equal high parts cancel on subtraction, leaving only the two low parts. Let represent a coefficient pair with common high part . Write and , with . Subtraction gives
Since , this integer difference is already the centered representative of the raw coefficient difference. The argument applies to every coefficient, including those at bin boundaries.
For the probability analysis, the secret vectors, and the replacement values are fixed independently of . The entries of are assumed independent and uniform in . Write for the number of nonzero transform-difference coordinates.
The bin condition reduces total erasure to small raw differences in all output rows. The dimension of each row's distribution is .
Theorem 4 (Total Power2Round erasure). For ML-DSA, fix secret vectors , a module slot , a fault set and its replacement values independently of . If satisfies and the entries of are independent and uniform in , then
Proof. Write and, for each row , . Coordinatewise multiplication of the uniform vector by the fixed vector is uniform on the space of vectors supported on . On each multiplier is nonzero, so multiplication permutes ; off the product vanishes. Invertibility of makes uniform on the -dimensional subspace
Let , which has elements. A matrix whose columns form a basis of has column rank , so it has linearly independent rows. Projection onto those coefficient positions has an invertible square matrix on this basis and therefore maps bijectively to . The projected coordinates of are thus jointly uniform. Membership in requires all these coordinates to lie in , giving
The vectors are independent, since each depends only on a different independent entry . By Lemma 7, requires in every row. Consequently,
Remark 2 (Support-dependent exponent). For a single last-layer replacement with nonzero difference, the affected butterfly contributes , where is its second input. There is no downstream layer, so and the exponent is , not .
Every nonzero difference has . The standardized row counts are [Nat24a, Table 1], so every standardized parameter set satisfies
Remark 3 (Non-erasure and reconstruction). The theorem bounds total erasure given . It establishes neither reconstruction of nor the number of coefficient-bounded secret polynomials consistent with the compressed public keys.
When the transform difference itself is known, the kernel gives a candidate-count bound. Let be the coefficient alphabet and write . For a known map and known value , define
Only this equation and the coefficient alphabet filter these candidates. Write for ML-KEM and for ML-DSA.
Corollary 3 (Candidates from a known difference). For either scheme, every fault set K with its replacement values, coefficient alphabet and value satisfy
Every one-per-layer pattern attains the lower bound.
Proof. Projection counts independent coordinates for the upper bound. The lower bound varies coordinates that every fault leaves unchanged.
Upper bound. Choose with and write and . Linearity gives . A basis matrix of has linearly independent rows, so projection onto those coordinates injects and its coset , because coset-point differences lie in . Candidates project into , giving at most choices, with by rank-nullity.
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
Lower bound. By Lemma 2, the first standard basis vectors lie in . Varying the first coefficients of independently over and fixing the others therefore gives distinct candidates.
Attainment. For a one-per-layer pattern, Theorem 2 gives . The two bounds therefore coincide at .
For the standardized coefficient alphabets, for ML-KEM and for ML-DSA [Nat24b, Table 2], [Nat24a, Table 1]. The attained per-polynomial counts are 49 for ML-KEM-512, 25 for ML-KEM-768 and ML-KEM-1024, 5 for ML-DSA-44 and ML-DSA-87, and 9 for ML-DSA-65.
These are candidate counts, not lower bounds on attack work. For ML-DSA they assume that is known, not merely . The unchanged vector cancels from and is not included in this single-polynomial count.
For Kyber768, the all-twiddle-zeroing attack [RYB 23, § 5.1] reports a search space of faulty secret vectors with three polynomials, each with two potentially nonzero coefficients in . Since , its 25 choices per polynomial agree numerically with the ML-KEM-768 count in Corollary 3.
The recovery targets and observations differ. The cited attack tests that fault-generated secret against its faulty public key; Corollary 3 instead counts coefficient-bounded candidates for one original polynomial, given a known map and raw transform difference in the paired-run model of Section 2. Consequently, the numerical agreement is not an attack-work lower bound.
The observations here are public keys from key generation. They do not determine how many faulted signing queries suffice for signing-key recovery.
5.1 Interaction with countermeasures
A single stored-twiddle replacement in layer reaches all butterflies in its group. A nonzero local difference is equivalent to one changed butterfly input and occurs exactly when the second input is nonzero. The number of realized errors therefore depends on the input. Detector guarantees must be matched to these errors in the checked transform, not to rank alone.
The interpolation check guarantees detection of a single coefficient error under its evaluation-point conditions [BSKA26, Lemmas 3 and 5]. The weighted-checksum method guarantees single-error detection and gives a two-error construction for Dilithium [AHRZ26, §§ 3.2–4.2]. Its Kyber check treats the even and odd half-sized transforms separately, so multiplicity must be counted per checked transform. The proposed construction does not furnish a pair of detection vectors guaranteeing two-error detection for Kyber.
For interpolation, ML-DSA's scalar check covers its last layer, where . For an ML-KEM input polynomial, write using its even and odd coefficients. At an admissible evaluation point , the checked remainder is [BSKA26, Eqs. (27)–(28)]
Its constant and linear coefficients are separate checks of the even and odd half-transforms. Each half has at most errors, so ML-KEM's last layer, with , is covered too. The two coefficients cannot cancel each other, and the evaluation-point conditions make a single error in either half detectable. Earlier layers can put several errors in one checked component; the single-error guarantees do not cover every such pattern.
For the weighted checks, a Kyber twiddle group splits evenly between coefficient parities, giving at most nonzero errors per half-transform. The corresponding bound in Dilithium's complete transform is . At Kyber's last layer , whereas Dilithium's last two layers have . The respective single- and two-error checks therefore detect all resulting nonzero differences. At earlier layers these bounds exceed the guaranteed multiplicities, so the guarantees alone do not cover every realized pattern.
Exceeding a guaranteed multiplicity does not establish a detection bypass. For multiple errors, the reported 1/q escape estimates make further assumptions. The interpolation analysis assumes the faulty interpolated value behaves like a random guess [BSKA26, § 3.2]; the weighted-checksum calculation assumes one error value is random and independent of the other [AHRZ26, § 3.3]. Neither assumption follows from a fixed stored-twiddle replacement.
Suppressing release of a faulty public key removes the paired-run observation of Section 2. In the NTT algorithm with the interpolation check, a mismatch invokes Error() before the return statement [BSKA26, Alg. 1]. The pseudocode does not specify whether this handler stops execution; faulty-key suppression therefore depends on the handler and the caller.
The fault-injection study of the combined blinded-NTT and redundant-number defense targets decapsulation. It reports aborting before writing the plaintext when the defense's check detects an error [DT25]. It also reports undetected effective faults during the NTT in decapsulation and describes detection of the twiddle-factor attack [RYB 23] only as probable. These decapsulation results do not establish suppression of faulty key-generation outputs.
Blinding is not an output-release policy. Fix the correct and faulted calls' blinding randomness separately; the choices need not agree. For the faulted call, fix a set K of replacement indices and a field value at each index. The set and values may depend on that call's randomness but are constant over the entire input space. A sufficient transfer condition is that, after unblinding and reduction modulo q, the correct call returns and the faulted call returns for every input polynomial x. Under this condition, the correct-minus-faulted output map is by definition. The reported decapsulation experiments do not verify these map identities for protected key generation.
The Barrett-recomputation design compares alternative arithmetic paths for the butterfly's modular multiplication [BPSD25, Algs. 1 and 5]. Its NTT driver loads one table twiddle per group, and both paths use operands derived from that value. Consistent use of a replaced twiddle can therefore leave the comparison satisfied; the comparison is not an independent check of the stored twiddle.
Raw-map ranks hold independently of release; using them as linear constraints requires the known map and raw difference of Section 2. They do not estimate faulty-key release probabilities or protection effectiveness. Layer has twiddles and singleton rank . At , the sole layer-0 twiddle has rank 128, versus 64 rank-2 twiddles in ML-KEM's last layer and 128 rank-1 twiddles in ML-DSA's. A protection policy additionally needs implementation costs, covered indices and replacement/release probabilities. The following checks address only the algebraic quantities.
6 Empirical Verification
The singleton checks use plain, non-Montgomery forward Cooley–Tukey networks and Gaussian elimination over . Singleton tests zero one indexed twiddle at every use and build from correct-minus-faulted evaluations on all coordinate basis vectors. The incomplete shape uses a bit-reversed table at and all 127 positions. The complete shape uses seeded uniform nonzero twiddles at and all positions, not the standardized ML-DSA table. Every measured rank equals , as Theorem 1 predicts.
Numerical verification programs and Lean proofs: https://github.com/ChakshuGupta13/lab/tree/main/cryptanalysis/gupta2026rank.
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
Unfaulted forward/inverse roundtrips use one seeded input per configuration: incomplete shapes with bit-reversed tables at , , and the three complete-shape pairs above. The former do not exercise the unreversed-ladder matrix sweeps below; the latter use a separate helper and twiddle construction and do not exercise the complete singleton routine. Table 1 groups singleton results by layer.
Table 1: Singleton zeroing ranks. The displayed complete-shape column is . Small-field agreement tests the butterfly structure, not a standard-parameter ML-DSA implementation.
| Layer | ML-KEM (n = 256) | Complete shape (n = 32) |
|---|---|---|
| 0 | 128 | 16 |
| 1 | 64 | 8 |
| 2 | 32 | 4 |
| 3 | 16 | 2 |
| 4 | 8 | 1 |
| 5 | 4 | - |
| 6 | 2 | - |
For one replacement per layer, incomplete matrix sweeps at use an unreversed power ladder, not the singleton table. For each of the 64 selections at and 1024 at , zeroing gives rank and nullity 2, matching Theorem 2; these sweeps do not compute kernel bases.
A plain Python checker at instead uses the bit-reversed table. Six one-per-layer selections use the first, last and middle group in every layer, then three seeded random selections. Zeroing and give 12 cases, all with rank 254 and zero first and second columns. Those columns and nullity 2 identify .
At the three small complete-shape pairs, the helper selects the first group per layer and uses seeded powers of nonzero elements, not the singleton checker's uniform draws. Zeroing and changed nonzero replacements give six cases. The latter replacement is , or if that is zero. Rank and a zero first column identify in every case.
A separate C checker at uses plain modular arithmetic and the bit-reversed powers of the FIPS 204 512th root 1753 [Nat24a, Alg. 41]. It zeros selected twiddles at every use and builds by the same coordinate-basis procedure. The first twiddle in each of eight layers and indices 3, 7, 200, 255 give 12 singleton matrices, each of rank . Jointly zeroing the first twiddle per layer gives rank 255; zeroing in layer 1 gives . These match Theorems 1 and 2 and Corollary 2; they do not test equivalence to optimized ML-DSA code.
The C checks do not reproduce physical faults. Electromagnetic experiments on optimized pqm4 implementations of Kyber and Dilithium report twiddle-array zeroing through corruption of the shared pointer . That key-generation demonstration faults multiple polynomial transforms, not the single call assumed here. A separate Cortex-M4 experiment on modified Dilithium-2 code skipped the first-stage assignment to the working twiddle variable, with that variable zero-initialized and compiler optimization disabled [YLMZ25, Secs. IV-C, V]. These demonstrations motivate twiddle corruption, but do not establish arbitrary control of a single twiddle in optimized firmware.
No firmware-level or physical reproduction is performed here. Firmware validation would require the complete fixed-replacement and unchanged-computation contract of Section 2 for one polynomial's forward call. Establishing that logical contract would not establish physical injection reliability.
The Lean 4.27.0 and Mathlib 4.27.0 artifact proves the one-per-layer kernel claims of
Theorem 2 for both forward shapes at n = 256 and arbitrary changed values. Its two kernel theorems have axiom dependencies exactly propext, Classical.choice and Quot.sound. The certified statements concern abstract difference maps, not deployed-code correctness. Separately, assembly NTT-based multiplications for Kyber, SABER and NTRU are verified with CryptoLine [HLS 22], while verified constant-time C implementations of both NTT shapes are derived in Rocq [Tri26].
7 Limitations
The forward-NTT rank results concern the static twiddle-replacement model. Faults on input coefficients or stored butterfly outputs are not characterised here. Remarks 5 and 6 consider intermediate-product bit-flips and permutation-table faults under separate models. Remark 8 addresses inverse-NTT rank and observability.
Remark 4 (Twiddle bit-flips). A twiddle is represented by its canonical integer in . Toggling bit position and reducing modulo gives . For , the change is with , so in . If this fixed replacement reaches every use of the indexed twiddle, it is an instance of the static twiddle-replacement model. A bit-flip affecting only some uses is not covered.
Theorems 1 and 2 apply directly to , not the faulted transform . If all replacement twiddles are nonzero, Lemma 1 makes invertible. That invertibility is a different property from the rank of .
Remark 5 (Intermediate-product faults). Consider a different fault model. In every butterfly of one group , toggle a fixed bit of the canonical reduced product , then reduce modulo before the butterfly additions. Assume and leave every other operation unchanged. The correct-minus-faulted transform difference is denoted by . In , the contribution of butterfly is
The product bit determines the sign, not a field-valued linear coefficient of the input. At zero input, each affected butterfly has difference . The pairs are disjoint and the unchanged suffix is invertible, so . Thus is not linear.
Let be the unchanged suffix's image of on butterfly 's pair. Disjoint pairs and suffix invertibility make these vectors independent; they span as in the proof of Theorem 1. Every lies in this span. Conversely, the invertible prefix and let the products vary independently. Choose two inputs whose products differ only at butterfly , taking values 0 and . Their difference values differ by , a nonzero multiple since is odd. Thus every lies in the image span, proving
Each difference value is determined by the product bits. The span equality does not turn this nonlinear observation into that many field-valued linear constraints. It applies to the stated group-wide fault; a fault on only one butterfly has only that butterfly's difference direction.
Remark 6 (Input-reordering table faults). Consider a fault changing one entry of an input-reordering table to another in-range index. Let P and be the correct and faulted reordering maps, and let F be the remaining unfaulted forward transform. Lemma 1 makes F invertible, so
For a lookup table , assume output position reads input position , so . Changing one table entry then changes only one row. That row has a 1 and a -1 at distinct columns, giving rank one. The faulted lookup need not itself be a permutation.
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
For an in-place swap loop, suppose each table entry is processed once at a fixed loop index. A changed entry can add or remove one conditional swap, replace it by another swap sharing that index, or leave both swaps inactive. Cancelling the identical invertible prefix and suffix preserves difference rank. Adding or removing a swap gives rank one; two distinct swaps sharing an index have a relative 3-cycle with a one-dimensional fixed space on three coordinates, giving rank two. Thus the difference rank is at most two.
A single twiddle replacement has rank , which is at least this swap-loop bound when . At the complete shape's length-one layer, a rank-two swap-loop fault can exceed it. These are raw difference-map comparisons, not implementation-level protection priorities. The argument covers the specified input-reordering models, not partner-offset faults inside the butterfly layers.
Remark 7 (Signing queries and raw rank). Theorem 2 concerns the raw difference map of one secret polynomial in the key-generation observation regime of §2, not a signing-query count.
The attack in [YLMZ25, Sec. IV-C] instead zeroes the first-stage shared twiddle during the forward NTT of one polynomial of the signing mask y. Under that paper's signing implementation and fault model, it reports two faulty signatures per secret polynomial to recover . This is a single-key, multi-query procedure, not the same-input transform difference studied here. That recovery uses coefficients exposed by zeroing in released faulty responses. The raw rank and kernel results alone establish neither that exposure nor the signing-query count.
Remark 8 (Inverse-NTT rank and observability). Consider the Gentleman–Sande butterfly , with the forward layers executed in reverse order. Write for this network with nonzero original twiddle table , and for fixed replacements that differ from the originals at every use of each selected group. Define . A fixed nonzero final normalization does not change its rank or kernel.
The Gentleman–Sande butterfly matrix is the transpose of the Cooley–Tukey matrix with negated twiddle,
Transposition reverses composition, so has the rank of the forward difference with original and replacement tables negated. For one changed twiddle per layer, Theorem 2 therefore gives rank for the incomplete shape and for the complete shape. The corresponding kernels are
Here NTT uses the original forward table of §2. Fix one of the displayed basis vectors in its respective shape, and write for its state after forward layers. Thus and . By the proof of Lemma 2, every forward butterfly has zero second input and maps to , independently of its twiddle.
For every original or replacement multiplier z, the reverse butterfly maps to . Hence reverse layer r maps to . By linearity and downward induction, after reversing layers , either run has state . At r = 0, both runs therefore give
Thus , establishing the kernel inclusion. Forward invertibility makes the displayed images independent; the stated ranks and rank-nullity give the kernel equalities.
The inverse kernel equalities at are certified in the accompanying Lean 4.27.0 and Mathlib 4.27.0 artifact. The artifact expresses its kernel vectors as forward images of the same basis vectors. These images are independent of the twiddle table by the preceding argument, so they coincide with the displayed vectors. The certified statements require a field with , nonzero original twiddles and one changed twiddle per layer. Their axiom dependencies are exactly propext, Classical.choice and Quot.sound. This certifies the abstract networks, not deployed inverse-NTT code or access to a protocol observable.
Protocol outputs must be considered separately. ML-KEM decapsulation re-encrypts the decrypted message and uses implicit rejection to select a shared secret; it does not return the inverse-NTT output or its internal comparison flag [Nat24b, Alg. 18]. In ML-DSA key generation, the inverse NTT follows the matrix-vector product and precedes addition of and Power2Round. Its input is a component of that product, not an individual polynomial of [Nat24a, Alg. 6]. Signing has inverse calls in the commitment, response and checking computations, followed by rejection tests [Nat24a, Alg. 7]. None of these interfaces automatically reveals . The rank and kernel identities alone establish neither a rejection probability nor an inverse-fault key-recovery procedure.
8 Conclusion
For a single static twiddle replacement, the rank of the raw transform-difference map halves at each successive layer, and one changed twiddle per layer attains the largest raw-difference rank. For the one-per-layer pattern, a known map and raw difference determine every coefficient of one input polynomial except its constant and linear coefficients for ML-KEM, or its constant coefficient for ML-DSA. For each scheme, those same coefficients cancel from the raw difference for every allowed fault pattern.
For ML-KEM, consider correct and faulted key generations from the same seed that differ only through twiddle replacements in one secret-polynomial NTT call. Their released public keys determine the raw transform difference if the affected public-matrix column is known and contains an invertible entry. For ML-DSA, reconstruction from the paired compressed public keys is not established here. Connecting the forward-NTT rank and coefficient-ambiguity results to an implemented attack or protection policy still requires an account of fault delivery and output release.
Use of AI tools. Generative AI tools assisted with manuscript drafting and revision, Lean 4 formalisation, verification scripts, and figure preparation. The author directed and reviewed this work and takes responsibility for the correctness of all material.
References
[AHRZ26] Mohamed Abdelmonem, Lukas Holzbaur, Håvard Raddum, and Alexander Zeh. Efficient error detection methods for the number theoretic transforms in lattice-based algorithms. In Constructive Approaches for Security Analysis and Design of Embedded Systems (CASCADE 2025), volume 15952 of Lecture Notes in Computer Science, pages 185–210, 2026. ePrint 2025/170. doi:10.1007/978-3-032-01405-4_8.
[BPSD25] Paresh Baidya, Rourab Paul, Vikas Srivastava, and Sumit Kumar Debnath. Error detection schemes for Barrett reduction of CT-BU on FPGA in post quantum cryptography. arXiv preprint arXiv:2509.04070, 2025. arXiv:2509.04070v1 [cs.CR]. URL: https://arxiv.org/abs/2509.04070.
Rank Ceiling for Twiddle-Perturbation Faults on the Forward NTT
[BSKA26] Sven Bauer, Fabrizio De Santis, Kristjane Koleci, and Anita Aghaie. A fault-resistant NTT by polynomial evaluation and interpolation: Application to ML-KEM and ML-DSA. In Constructive Approaches for Security Analysis and Design of Embedded Systems (CASCADE 2025), volume 15952 of Lecture Notes in Computer Science, pages 211–231, 2026. ePrint 2024/788. doi:10.1007/978-3-032-01405-4_9.
[Del22] Jeroen Delvaux. Roulette: A diverse family of feasible fault attacks on masked Kyber. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2022(4):637–660, 2022. ePrint 2021/1622. doi:10.46586/tches.v2022.i4.637-660.
[DT25] Max Duparc and Mounir Taha. Improved NTT and CRT-based RNR blinding for side-channel and fault resistant Kyber. Cryptology ePrint Archive, Paper 2025/181, 2025.
[GBP18] Leon Groot Bruinderink and Peter Pessl. Differential fault attacks on deterministic lattice signatures. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2018(3):21–43, 2018. doi:10.13154/tches.v2018.i3.21-43.
[HLS 22] Vincent Hwang, Jiaxiang Liu, Gregor Seiler, Xiaomu Shi, Ming-Hsien Tsai, Bow-Yaw Wang, and Bo-Yin Yang. Verified NTT multiplications for NISTPQC KEM lattice finalists: Kyber, SABER, and NTRU. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2022(4):718–750, 2022. doi:10.46586/tches.v2022.i4.718-750.
[KPLG24] Elisabeth Krahmer, Peter Pessl, Georg Land, and Tim Güneysu. Correction fault attacks on randomized CRYSTALS-Dilithium. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2024(3):174–199, 2024. doi:10.46586/tches.v2024.i3.174-199.
[Nat24a] National Institute of Standards and Technology. Module-Lattice-Based Digital Signature Standard. Technical Report FIPS 204, U.S. Department of Commerce, Aug 2024. doi:10.6028/NIST.FIPS.204.
[Nat24b] National Institute of Standards and Technology. Module-Lattice-Based Key-Encapsulation Mechanism Standard. Technical Report FIPS 203, U.S. Department of Commerce, Aug 2024. doi:10.6028/NIST.FIPS.203.
[RYB 23] Prasanna Ravi, Bolin Yang, Shivam Bhasin, Fan Zhang, and Anupam Chattopadhyay. Fiddling the twiddle constants — fault injection analysis of the number theoretic transform. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2023(2):447–481, 2023. ePrint 2022/824. doi:10.46586/tches.v2023.i2.447-481.
[Tri26] Alix Trieu. Formally verified number-theoretic transform. IACR Communications in Cryptology, 2(4), 2026. doi:10.62056/ahbn-4tw9.
[VRBW25] Hariprasad Kelassery Valsaraj, Prasanna Ravi, Shivam Bhasin, and Hongjun Wu. When randomness isn't random: Practical fault attack on post-quantum lattice standards. Cryptology ePrint Archive, Paper 2025/2009, 2025.
[YLMZ25] Hao Yuan, Yuejun Liu, Jingdian Ming, and Yongbin Zhou. Diverse fault attacks on Dilithium and variant implementation: Skipping, aborting and zeroing. In Proc. IEEE 24th Internat. Conf. Trust, Security and Privacy in Computing and Communications (TrustCom), pages 2986–2993, 2025. doi:10.1109/Trustcom66490.2025.00354.