Additive NTT Algorithm #
Core Additive NTT data flow: evaluation points, twiddle factors, stage/update definitions, coefficient tiling, and the stage invariant.
2. The Additive NTT Algorithm and Correctness #
This section describes the construction of the evaluation points, the tiling of coefficients, the main loop invariant, and the final correctness theorem for the Additive NTT algorithm.
Constructs an evaluation point in sDomain i from its Nat.getBit representation.
The index is loose (i : Fin r); h_i records that it is an Additive-NTT level.
Instances For
The twiddle factor at a strict NTT stage i.
It is the evaluation point with the stage bit set to zero, i.e. the x₀ term of
the butterfly identity.
Instances For
A single Additive-NTT stage.
i : Fin r is a loose index, while h_i : i < ℓ restricts it to a stage of the
for i from ℓ - 1 down to 0 loop.
Instances For
The Additive NTT Algorithm (Algorithm 2)
Computes the Additive NTT on a given set of coefficients from the novel basis.
a: The initial coefficient array(a₀, ..., a_{2^ℓ-1}).
Instances For
The coefficients of the level-i polynomial selected by the low-bit suffix v.
The loose index i : Fin r is constrained by h_i : i ≤ ℓ; at i = ℓ this is
the initially tiled buffer.
Instances For
P₀, ₍ᵥ₎⁽ⁱ⁺¹⁾(X) = P₍₀ᵥ₎⁽ⁱ⁺¹⁾(X), where v consists of exactly i bits
Note that the even refinement P₀, ₍ᵥ₎⁽ⁱ⁺¹⁾(X) is constructed from the view of
stage i, while the novel polynomial P₍₀ᵥ₎⁽ⁱ⁺¹⁾(X) is constructed from the view of stage i+1.
P₁, ₍ᵥ₎⁽ⁱ⁺¹⁾(X) = P₍₁ᵥ₎⁽ⁱ⁺¹⁾(X), where v consists of exactly i bits
Note that the odd refinement P₁,₍ᵥ₎⁽ⁱ⁺¹⁾(X) is constructed from the view of stage i,
while the novel polynomial P₍₁ᵥ₎⁽ⁱ⁺¹⁾(X) is constructed from the view of stage i+1.
The main loop invariant for the additiveNTT algorithm: the evaluation buffer b
at the end of level i (i ∈ {0, ..., ℓ}, i=ℓ means the initial tiled buffer)
holds the value P⁽ⁱ⁾(ω_{u, b, i}) for all Nat.getBit mask index
(u||b||v) ∈ {0, ..., 2^(ℓ+R_rate)-1}, where the points ω_{u, b, i} are in the domain S⁽ⁱ⁾.
Main statement:
After round i ∈ {ℓ-1, ℓ-2, ..., 0}: the buffer b at index j (which can be
decomposed as j = (u || b || v) in little-endian order, where
uis a bitstring of lengthℓ + R_rate - i - 1,bis a single Nat.getBit (the LSB of the high bits),vis a bitstring of lengthi(the LSBs), holds the valueP⁽ⁱ⁾(ω_{u, b, i}), where:P⁽ⁱ⁾is the intermediate polynomial at roundi(in the novel basis),ω_{u, b, i}is the evaluation point in the subspaceS⁽ⁱ⁾constructed as a linear combination of the basis elements ofS⁽ⁱ⁾:- the Nat.getBit
bis the coefficient forŴᵢ(βᵢ)(the LSB), - the LSB of
uis the coefficient forŴᵢ(β_{i+1}), ..., the MSB ofuis the coefficient forŴᵢ(β_{ℓ+R_rate-1}).
- the Nat.getBit
- The value is replicated
2^itimes for eachv(i.e., the lastibits do not affect the value).
More precisely, for all j : Fin (2^(ℓ + R_rate)),
let u_b_v := j.val (as a natural number),
- let
v := u_b_v % 2^i(theiLSBs), - let
u_b := u_b_v / 2^i(the high bits), - let
b := u_b % 2(the LSB of the high bits), - let
u := u_b / 2(the remaining high bits), then: b j = P⁽ⁱ⁾(ω_{u, b, i})