Tuesday, July 12, 2016

Discrete logarithm tables for the fields BbbF8 and BbbF16.




The smallest non-trivial finite field of characteristic two is
F4={0,1,β,β+1=β2},


where β and β+1 are primitive cubic roots of unity, and zeros of the
polynomial x2+x+1. Here the multiplication table is given once we know
how to write the non-zero elements as powers of β. Extend the idea to fields of eight and sixteen elements.



Those fields can be constructed as
F8=F2[α],andF16=F2[γ],


where α has minimal polynomial x3+x+1, and γ has minimal polynomial x4+x+1, both irreducible in F2[x].



Task:




Calculate the tables for base α discrete logarithm of F8 and base γ discrete logarithm of F16.



Answer




A (base-g) discrete logarithm of a finite field Fq, is a function
logg:FqZq1


defined via the equivalence gj=xlogg(x)=j. For this to be well-defined it is imperative that g is a primitive element, i.e. a generator of Fq, and that the domain of logg is the
residue class ring of integer modulo q1, as gq1=g0=1.



It immediately follows that the discrete logarithm satisfies the familiar rules
logg(xy)=logg(x)+logg(y),logg(xn)=nlogg(x)


for all elements x,yFq and all integers n. The arithmetic
on the r.h.s. is that of the ring Zq1.






It is known that when q=8, a zero α of x3+x+1 generates F8. This is proven by the following calculation, where we repeatedly

use the fact that we are working in characteristic two, and that we have the
relation α3=α+1.
α0==1,α1==α,α2==α2,α3==1+α,α4=αα3=α(1+α)=α+α2,α5=αα4=α(α+α2)=α2+α3=α2+(1+α)=1+α+α2,α6=αα5=α(1+α+α2)=α+α2+α3=α+α2+(1+α)=1+α2,α7=αα6=α(1+α2)=α+α3=α+(1+α)=1.



We see from the end results in the last column that all the non-zero
quadratic polynomials evaluated at α appear. This is yet another confirmation of the fact that α is a primitive element.



The discrete logarithm is used to replace the cumbersome multiplication (and raising
to an integer power) of the field with more familiar integer arithmetic. Exactly like the old-timers used logarithm tables to replace the error-prone multiplication with the easier addition.




For example
(1+α)(1+α+α2)=α3α5=α8=α7α=α.


Note that both the base-α discrete logarithms and its inverse mapping are needed. I generate such a table as a part of the program initialization, whenever I carry out extensive computer-aided calculations involving a finite field. The above table gives the discrete logarithm when read from right to left, and the inverse mapping (that we actually produced above) when read from left to right.






Similarly with q=16 we use γ, a zero of x4+x+1. This time the table looks like

γ0=1γ1=γγ2=γ2γ3=γ3γ4=γ+1γ5=γ(γ+1)=γ2+γγ6=γ(γ2+γ)=γ3+γ2γ7=γ4+γ3=γ3+γ+1γ8=(γ4)2=γ2+1γ9=γ(γ2+1)=γ3+γγ10=γ4+γ2=γ2+γ+1γ11=γ3+γ2+γγ12=γ4+γ3+γ2=γ3+γ2+γ+1γ13=γ4+γ3+γ2+γ=γ3+γ2+1γ14=γ4+γ3+γ=γ3+1(γ15=γ4+γ=1)




Thus for example
(γ3+1)(γ2+1)=γ14γ8=γ22=γ7=γ3+γ+1.






As another example of the use of this table I want to discuss the problem of factorizing x4+x+1 over F4. To that end we need to first identify a copy of F4 as a subfield of F16. We just saw that γ is of order fifteen. Therefore γ5=γ2+γ and γ10=γ2+γ+1 are third roots of unity. It is then trivial to check that we have a homomorphism of fields σ:F4F16 given by σ(β)=γ5. Note that composing this (from either end) by the Frobenius automorphism gives an alternative embedding βγ10.




Basic Galois theory tells us that
x4+x+1=(xγ)(xγ2)(xγ4)(xγ8)


as we get the other roots by repeatedly applying the Frobenius automorphism F:xx2. Here we see that the factor
(xγ)(xγ4)=x2+x(γ+γ4)+γ5=x2+x+γ5

is stable under the automorphism F2, and thus (as we also see directly!) has its
coefficients in the subfield σ(F4). The same holds for the remaining factor

(xγ2)(xγ8)=x2+x(γ2+γ8)+γ10=x2+x+γ10.

Pulling back the effect of σ we get the desired factorization
x4+x+1=(x2+x+β)(x2+x+β+1)

in F4[x].







Here is a local version of similar tables for F256


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...