FInd the square root in Galois Field.
Afficher commentaires plus anciens
Hello everyone,
I am confused about how to find square root in the Galois Field. For example, in GF(2^4), a=gf(15,4); And the square root of a should be 12. However, when I use gf(15,4)^0.5 to calculate the square root, it shows 15...
sqrt command is not valid in Galois field. I will appreciate if anyone can provide some advice. Thanks in advance.
Réponses (1)
As far as I can tell, Matlab doesn't allow you to use sqrt() for GF elements, though Octave does. You can use the roots function. To find sqrt(gf(356,11)):
y = roots([1 0 gf(356,11)]) % Roots of z^2 + gf(356,11) = 0
This is really slow; it takes over 1 second on my machine. There are faster ways to find the square root in an extension field, but this is easiest. You can use the same method for cube roots:
y = roots([1 0 0 gf(356,11)]) % Roots of z^3 + gf(356,11) = 0
Catégories
En savoir plus sur Error Detection and Correction dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!