FInd the square root in Galois Field.

2 views (last 30 days)
Xu
Xu on 13 Dec 2012
Edited: Kevin on 1 Jun 2015
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.

Answers (1)

Kevin
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

Community Treasure Hunt

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

Start Hunting!