Effacer les filtres
Effacer les filtres

finding primitive element of GF(2^m)

4 vues (au cours des 30 derniers jours)
xplore29
xplore29 le 22 Mar 2012
Hi
How can I find the primitive element (field generator) of a GF(2^m) where q=2^m.
The following code gives the roots of primitive polynomial for the specified GF(q)
n = q-1; a = gf(2,log2(n+1))
but i cannot figure out a way to confirm that the roots of primitive polynomial ARE the generators of the extension field.
I tried using a simple loop
for i=1:q-2
f(i)=mod(2^i,q-1);
end
sort(f)
hoping that this will show that the generator stepped through each element of the field but its not working......
Thanku.

Réponses (1)

xplore29
xplore29 le 22 Mar 2012
correction:
b=a(1); %picking the first root of primitive polynomial for testing
for i=1:q-2
f(i)=mod(b^i,q-1);
end

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by