FInd the square root in Galois Field.
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Kevin
on 1 Jun 2015
Edited: Kevin
on 1 Jun 2015
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
0 Comments
See Also
Categories
Find more on Error Detection and Correction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!