Inversion

Presentation: https://youtu.be/9wpJk-wUa-w, https://www.youtube.com/watch?v=54I7Rd9_9_s

1. Frobenius Mapping

Given a prime PP, the Frobenius Mapping Φ\Phi on an element aFPka \in \mathbb{F}_{P^k} is defined as: Φ(a)=aP\Phi(a) = a^P

This mapping is a crucial endomorphism of the field FPk\mathbb{F}_{P^k} that fixes the elements of the prime subfield FP\mathbb{F}_P.

2. Efficient Computation of Φ(a)\Phi(a)

Let the field element aa be represented as a polynomial over the prime field: a=i=0k1aixia = \sum_{i=0}^{k-1} a_i x^i, where aiFPa_i \in \mathbb{F}_P.

2.1. Basic Computation using Characteristic PP

Since the characteristic of the field is PP, we can apply the Freshman's Dreamarrow-up-right property:

Φ(a)=aP=(i=0k1aixi)P=i=0k1(ai)P(xi)P\Phi(a) = a^P = \left(\sum_{i=0}^{k-1} a_i x^i\right)^P = \sum_{i=0}^{k-1} (a_i)^P (x^i)^P

Since aiFPa_i \in \mathbb{F}_P, by Fermat's Little Theoremarrow-up-right, we have aiP=aia_i^P = a_i. Thus, the mapping simplifies to:

Φ(a)=i=0k1aixiP\Phi(a) = \sum_{i=0}^{k-1} a_i x^{iP}

2.2. Optimized Computation when P1(modk)P \equiv 1 \pmod k

If the extension is defined by an irreducible polynomial such that xk=ξx^k = \xi (where ξFP\xi \in \mathbb{F}_P), and P1(modk)P \equiv 1 \pmod k (meaning P1P-1 is divisible by kk), we can further optimize the expression.

Let q=P1kq = \frac{P-1}{k}. We can rewrite xiPx^{iP} using the field relation xk=ξx^k = \xi:

xiP=xi(qk+1)=xiqkxi=(xk)iqxi=ξiqxix^{iP} = x^{i(qk+1)} = x^{iqk} \cdot x^i = (x^k)^{iq} \cdot x^i = \xi^{iq} \cdot x^i

Substituting this back into the formula for Φ(a)\Phi(a):

Φ(a)=i=0k1ai(ξq)ixi=i=0k1ai(ξP1k)ixi=a0+a1(ξP1k)x+a2(ξP1k)2x2++ak1(ξP1k)k1xk1\begin{align*} \Phi(a) &= \sum_{i=0}^{k-1} a_i \left(\xi^q\right)^i x^i \\ &= \sum_{i=0}^{k-1} a_i \left(\xi^{\frac{P-1}{k}}\right)^i x^i \\ &= a_0 + a_1 \left(\xi^{\frac{P-1}{k}}\right) x + a_2 \left(\xi^{\frac{P-1}{k}}\right)^2 x^2 + \cdots + a_{k-1} \left(\xi^{\frac{P-1}{k}}\right)^{k-1} x^{k-1} \end{align*}

This demonstrates that if the set of scalar factors (ξP1k,,ξ(k1)P1k)\left(\xi^{\frac{P-1}{k}}, \dots, \xi^{(k-1){\frac{P-1}{k}}}\right) is pre-computed, the Frobenius mapping can be calculated efficiently using only scalar multiplications and polynomial addition.

circle-info

Pre-computation Note: Since Φk(a)=a\Phi^k(a) = a, we only need to pre-compute the set of iterated mappings (Φ(a),Φ2(a),,Φk1(a))\left(\Phi(a), \Phi^2(a), \dots, \Phi^{k-1}(a)\right) for use in the Norm and Inversion calculations.

3. Norm

The Norm of an element aFPka \in \mathbb{F}_{P^k}, denoted N(a)N(a), is defined as the product of aa and all its images under the iterated Frobenius mappings:

N(a)=i=0k1Φi(a)=a×Φ(a)×Φ2(a)××Φk1(a)N(a) = \prod_{i=0}^{k-1} \Phi^i(a) = a \times \Phi(a) \times \Phi^2(a) \times \cdots \times \Phi^{k-1}(a)

3.1. Key Property of the Norm

The most important property of the norm is that its result is an element of the prime subfield FP\mathbb{F}_P. N(a)FP\mathbf{N(a) \in \mathbb{F}_P}

Proof: We apply the Frobenius mapping to N(a)N(a):

Φ(N(a))=Φ(i=0k1Φi(a))=i=0k1Φ(Φi(a))=i=0k1Φi+1(a)=Φ1(a)×Φ2(a)××Φk1(a)×Φk(a)\begin{aligned} \Phi(N(a)) &= \Phi\left(\prod_{i=0}^{k-1} \Phi^i(a)\right) \\ &= \prod_{i=0}^{k-1} \Phi(\Phi^i(a)) \\ &= \prod_{i=0}^{k-1} \Phi^{i+1}(a) \\ &= \Phi^1(a) \times \Phi^2(a) \times \cdots \times \Phi^{k-1}(a) \times \Phi^k(a) \end{aligned}

Since Φk(a)=a\Phi^k(a) = a, we can replace the last term:

Φ(N(a))=Φ1(a)×Φ2(a)××Φk1(a)×a=N(a)\Phi(N(a)) = \Phi^1(a) \times \Phi^2(a) \times \cdots \times \Phi^{k-1}(a) \times a = N(a)

The condition Φ(N(a))=N(a)\Phi(N(a)) = N(a) means N(a)P=N(a)N(a)^P = N(a), which, by Fermat's Little Theorem, implies that N(a)N(a) must belong to the prime field FP\mathbb{F}_P.

4. Inversion on the Extension Field FPk\mathbb{F}_{P^k}

The norm N(x)N(x) is instrumental in efficiently computing the inverse x1x^{-1} for any non-zero element xFPkx \in \mathbb{F}_{P^k}.

4.1. Defining the Factor rr

Let rr be defined as the sum of powers of PP:

r=Pk1P1=i=0k1Pi=1+P+P2++Pk1r = \frac{P^k - 1}{P-1} = \sum_{i=0}^{k-1} P^i = 1 + P + P^2 + \cdots + P^{k-1}

We can rewrite x1x^{-1} using rr:

x1=xr1xrx^{-1} = x^{r-1} \cdot x^{-r}

4.2. Calculating xr1x^{r-1}

The exponent r1r-1 can be expressed as a sum of powers of PP:

r1=P+P2++Pk1r-1 = P + P^2 + \cdots + P^{k-1}

This allows xr1x^{r-1} to be calculated as a product of iterated Frobenius images:

xr1=xP×xP2××xPk1=Φ(x)×Φ2(x)××Φk1(x)=i=1k1Φi(x)x^{r-1} = x^P \times x^{P^2} \times \cdots \times x^{P^{k-1}} = \Phi(x) \times \Phi^2(x) \times \cdots \times \Phi^{k-1}(x) = \prod_{i=1}^{k-1}\Phi^i(x)

4.3. Calculating xrx^{-r}

Note that xr=xxr1x^r = x \cdot x^{r-1}. Comparing this to the Norm definition, we see that:

xr=xi=1k1Φi(x)=N(x)x^r = x \cdot \prod_{i=1}^{k-1}\Phi^i(x) = N(x)

Since xr=N(x)x^r = N(x) is an element of FP\mathbb{F}_P (a scalar), its inverse xr=N(x)1x^{-r} = N(x)^{-1} can be computed quickly within the prime field FP\mathbb{F}_P.

In practice, N(x)N(x) is simply the constant term of the polynomial resulting from the product xr1xx^{r-1} \cdot x:

xr=((xr1x)0)1x^{-r} = \left((x^{r-1} \cdot x)_0\right)^{-1}

where (A)0(A)_0 denotes the constant coefficient of polynomial AA.

4.4. Final Inversion Formula

The inverse x1x^{-1} is calculated as the product of the pre-computed Frobenius images xr1x^{r-1} and the inverse of the constant term N(x)N(x):

x1=xr1((xr1x)0)1x^{-1} = x^{r-1} \cdot \left((x^{r-1} \cdot x)_0\right)^{-1}

5. Relative Frobenius Mapping

In a tower of extensions FPn/FPm/FP\mathbb{F}_{P^n} / \mathbb{F}_{P^m} / \mathbb{F}_P (where n=mkn = m \cdot k), the Relative Frobenius Mapping Φrel\Phi_{rel} on an element aFPna \in \mathbb{F}_{P^n} with respect to the base field FPm\mathbb{F}_{P^m} is defined as:

Φrel(a)=aPm\Phi_{rel}(a) = a^{P^m}

Unlike the absolute Frobenius map Φ(a)=aP\Phi(a) = a^P, this mapping specifically fixes the elements of the intermediate field FPm\mathbb{F}_{P^m}. That is, for any xFPmx \in \mathbb{F}_{P^m}, Φrel(x)=x\Phi_{rel}(x) = x.

6. Relative Norm

The Relative Norm of an element aFPna \in \mathbb{F}_{P^n} over FPm\mathbb{F}_{P^m}, denoted as NFPn/FPm(a)N_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(a), is defined as the product of aa and its images under the iterated relative Frobenius mappings:

NFPn/FPm(a)=i=0k1Φreli(a)=a×aPm×aP2m××aP(k1)mN_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(a) = \prod_{i=0}^{k-1} \Phi_{rel}^i(a) = a \times a^{P^m} \times a^{P^{2m}} \times \cdots \times a^{P^{(k-1)m}}

6.1. Properties and Transitivity (Tower Property)

The norm in a tower structure exhibits the property of Transitivity, which allows for step-by-step reduction across multiple layers of extension:

  • Mapping to Base Field: The result of the relative norm is always an element of the immediate base field: NFPn/FPm(a)FPmN_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(a) \in \mathbb{F}_{P^m}.

  • Absolute Norm: The norm of an element relative to the prime field FP\mathbb{F}_P (the absolute norm) can be computed by taking the norm of the norm:

    NFPn/FP(a)=NFPm/FP(NFPn/FPm(a))N_{\mathbb{F}_{P^n}/\mathbb{F}_P}(a) = N_{\mathbb{F}_{P^m}/\mathbb{F}_P}(N_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(a))

6.2. Mathematical Derivation of Transitivity

To compute the absolute norm NFPn/FP(a)N_{\mathbb{F}_{P^n}/\mathbb{F}_P}(a) using the tower property, we follow a stepwise reduction process through the intermediate field FPm\mathbb{F}_{P^m}.

Step 1: Relative Norm from FPn\mathbb{F}_{P^n} to FPm\mathbb{F}_{P^m}

First, we reduce the element aFPna \in \mathbb{F}_{P^n} to an element bFPmb \in \mathbb{F}_{P^m} by applying the relative norm:

b=NFPn/FPm(a)=i=0k1a(Pm)i=a×aPm×aP2m××aP(k1)mb = N_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(a) = \prod_{i=0}^{k-1} a^{(P^m)^i} = a \times a^{P^m} \times a^{P^{2m}} \times \cdots \times a^{P^{(k-1)m}}

Step 2: Absolute Norm from FPm\mathbb{F}_{P^m} to FP\mathbb{F}_P

Next, we treat bb as an element of the base field and apply its own norm mapping toward the prime field:

NFPm/FP(b)=j=0m1bPj=b×bP×bP2××bPm1N_{\mathbb{F}_{P^m}/\mathbb{F}_P}(b) = \prod_{j=0}^{m-1} b^{P^j} = b \times b^P \times b^{P^2} \times \cdots \times b^{P^{m-1}}

Step 3: Final Consolidation

By substituting the definition of bb into the second equation, we obtain the double product:

NFPn/FP(a)=j=0m1(i=0k1aPmi)Pj=j=0m1i=0k1aPmi+jN_{\mathbb{F}_{P^n}/\mathbb{F}_P}(a) = \prod_{j=0}^{m-1} \left( \prod_{i=0}^{k-1} a^{P^{mi}} \right)^{P^j} = \prod_{j=0}^{m-1} \prod_{i=0}^{k-1} a^{P^{mi + j}}

This double product covers all exponents P0,P1,,Pn1P^0, P^1, \dots, P^{n-1} exactly once, proving that:

NFPn/FP(a)=a×aP×aP2××aPn1N_{\mathbb{F}_{P^n}/\mathbb{F}_P}(a) = a \times a^P \times a^{P^2} \times \cdots \times a^{P^{n-1}}

6.3. Practical Example: FP4/FP2/FP\mathbb{F}_{P^4} / \mathbb{F}_{P^2} / \mathbb{F}_P

For an element aFP4a \in \mathbb{F}_{P^4} where k=2k=2 and m=2m=2:

  1. Relative Norm: b=NFP4/FP2(a)=aaP2b = N_{\mathbb{F}_{P^4}/\mathbb{F}_{P^2}}(a) = a \cdot a^{P^2}.

  2. Base Norm: NFP2/FP(b)=bbPN_{\mathbb{F}_{P^2}/\mathbb{F}_P}(b) = b \cdot b^P.

  3. Result: (aaP2)(aaP2)P=aaPaP2aP3(a \cdot a^{P^2}) \cdot (a \cdot a^{P^2})^P = a \cdot a^P \cdot a^{P^2} \cdot a^{P^3}, which is the absolute norm.

7. Recursive Inversion in Tower Extensions

The tower property of the norm provides an efficient recursive algorithm for computing the inverse x1x^{-1} in high-degree extension fields.

  1. Compute Relative Norm: Calculate N(x)=xrFPmN(x) = x^{r} \in \mathbb{F}_{P^m} using the pre-computed relative Frobenius coefficients, where r=(Pm)k1Pm1r = \frac{(P^m)^k - 1}{P^m - 1}.

  2. Recursive Call: Compute the relative inverse of this norm, N(x)1N(x)^{-1}, within the base field FPm\mathbb{F}_{P^m}. If FPm\mathbb{F}_{P^m} is itself an extension field, repeat the norm-based inversion process.

  3. Final Reconstruction: Multiply the partial product of Frobenius images by the inverse obtained from the base field:

    x1=(i=1k1Φreli(x))NFPn/FPm(x)1x^{-1} = \left(\prod_{i=1}^{k-1}\Phi_{rel}^i(x)\right) \cdot N_{\mathbb{F}_{P^n}/\mathbb{F}_{P^m}}(x)^{-1}

Written by Ryan Kim of Fractalyze

Last updated